Download the PHP package survos/atlas-bundle without Composer
On this page you can find all versions of the php package survos/atlas-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download survos/atlas-bundle
More information about survos/atlas-bundle
Files in survos/atlas-bundle
Package atlas-bundle
Short Description Compile-time discovery of controllers, routes, and entities — the atlas the rest of survos draws maps from.
License MIT
Informations about the package atlas-bundle
Atlas Bundle
Compile-time discovery of controllers, routes, and entities — the atlas the rest of survos draws maps from.
What it does
At compile time, it walks:
- Controllers — every service tagged
container.service_subscriber(the Symfony default forAbstractControllersubclasses), recording oneRouteEntryper#[Route]method along with every other attribute on the method and class. - Entities — directories from
doctrine.orm.mappingsplussrc/Entityplus each registered bundle'sEntity/subdir, recording oneEntityEntryper concrete class with its class-level attributes.
The result is exposed as a runtime Atlas service. Atlas does not interpret attributes — it records them. Bundles like survos/field-bundle layer domain meaning (#[EntityMeta], #[RouteMeta], …) on top.
How attributes are stored — the {class, args} shape
Attribute payloads are kept as plain arrays, not instantiated objects:
args is exactly what ReflectionAttribute::getArguments() returned: positional values keyed by integer, named values keyed by string name.
This shape has three properties worth keeping in mind:
- Trivially serializable.
atlas:exportis a one-linejson_encodebecause there are no objects to coerce. - Resilient. A renamed or removed attribute class will not break the Atlas; only consumers that explicitly look for that FQCN are affected.
- Composable. Multiple bundles can read the same
RouteEntryand each pull out the attributes they care about, without any of them needing to instantiate the others' classes.
To turn a stored entry back into a real attribute object, unpack the args:
PHP's named-argument unpacking handles mixed positional/named args correctly, so this works whether the attribute was written as #[PublicApi(2)] or #[PublicApi(version: 2)].
Using the Atlas at runtime
Using the builders inside your own compiler pass
The builders are pure helpers — no service registration, no runtime cost when called from a compile pass.
Console
The output is the natural shape to paste into an LLM conversation when you want to ask design questions about your application's surface area.
Conventions
- A
#[Route]without an explicitname:is skipped. Atlas needs a stable identifier and won't guess. - Multiple
#[Route]attributes on the same method each produce their ownRouteEntry. - Entity discovery skips abstract classes, interfaces, and traits.
Which attributes get recorded
Atlas is opinionated. Only attributes whose class FQCN starts with one of these prefixes are captured:
Survos\— every survos attribute (RouteMeta, EntityMeta, RouteIdentity, Field, MeiliIndex, Facet, …)Symfony\Component\Routing\Attribute\—#[Route]Symfony\Component\Security\Http\Attribute\—#[IsGranted]Symfony\Bridge\Twig\Attribute\—#[Template]App\Attribute\— your own attributes
Anything else — most importantly ApiPlatform's #[ApiResource] and friends — is silently filtered out. ApiPlatform's attribute universe is huge and deeply nested; analyzing it belongs in survos/inspection-bundle, not here. Atlas's scope is "metadata that drives survos features," not "every attribute on every method."
If you genuinely need wider coverage, pass extra prefixes to AttributeFilter::accepts($fqcn, $extraNamespaces) from your own builder call — but reconsider the layering first.
See also
Atlas is intentionally low-level — it records what's there. If you want opinionated metadata attributes with semantic helpers on top, install survos/field-bundle:
field-bundle defines:
#[EntityMeta]— class-level metadata for admin UI, dashboards, menu auto-registration (icon, group, label, …)#[RouteMeta](in progress) — method-level metadata for sitemap inclusion, AI introspection, breadcrumb construction, …
Both are discovered through Atlas, and field-bundle ships richer registries (EntityMetaRegistry, RouteMetaRegistry) plus an enriched meta:export command that joins entities and routes into a single graph. Use Atlas directly when you have your own attribute vocabulary; reach for field-bundle when its vocabulary is what you'd be inventing.
All versions of atlas-bundle with dependencies
symfony/config Version ^8.0
symfony/console Version ^8.0
symfony/dependency-injection Version ^8.0
symfony/finder Version ^8.0
symfony/http-kernel Version ^8.0
symfony/routing Version ^8.0
symfony/yaml Version ^8.0