aura/di
Aura.Di is a serializable dependency injection container for PHP 8+ supporting constructor and setter injection, interface and trait awareness, configuration inheritance, and PSR-11 compliance. It has no external implementation dependencies and installs via Composer as aura/di.
illuminate/container into non-Laravel consumers.bin/auradi, blueprint generation, class-map scanning) and the container has historically been serializable (excluding closures). That is directly relevant to cold-start-sensitive workloads: serverless handlers, per-request CLI invocations, and batch jobs where container reflection cost is paid repeatedly.#[Service], #[Instance], #[Value], #[Blueprint]) plus AttributeConfigInterface let a team express wiring next to the code instead of in sprawling provider classes. This is a legitimate design-position question for internal platform teams: "explicit declarative config" vs. Laravel's auto-resolution-plus-providers model.Illuminate\Container. Laravel's container is load-bearing across the framework (facades, gates, queue, events, HTTP kernel), and swapping it is not a product decision, it is a fork. Any proposal that implies "replace Laravel's container" should be rejected at the roadmap level.Consider it when:
Look elsewhere when:
Illuminate\Container. There is no service provider, no facade bridge, no Eloquent/queue/event integration here, and the integration work would be yours to own permanently.Adoption criteria (checklist): PHP 8.0+ runtime confirmed · use case is outside or orthogonal to Laravel's container · team accepts PSR-11 as the contract · an owner is named for container config and upgrades · a documented fallback exists if the package stops receiving releases · a spike proves the compile/serialize path works under your deployment model.
For executives (one paragraph): Aura.Di is a small, MIT-licensed dependency injection library for PHP. It is not a replacement for Laravel's built-in container and would not change how our Laravel product runs today. Its value is narrow but real: it lets us write shared PHP code and internal packages that are not welded to Laravel, and it offers a compiled/serializable container for latency-sensitive workloads. The trade-off is ecosystem risk — it has a few hundred stars, no meaningful downstream adoption, and community support through a Google Group. Recommendation: approve it for a bounded, time-boxed evaluation inside one decoupled package or service, not as a platform standard. Cost is effectively zero in licensing; the real cost is the engineering owner we assign to it.
For engineering (the practical summary): PSR-11 container, PHP 8.0+, constructor and setter injection, interface and trait awareness, config inheritance, contextual parameters, lazy values, and — in 5.x — attribute-driven configuration (#[Service], #[Instance], #[Value], #[Blueprint]) with a compile step and a bin/auradi scan command. Docs, changelog, and releases are well maintained; CI covers current PHP versions; PHPStan is in play. What it does not give you: any Laravel integration, autowiring ecosystem tooling in the Symfony/PHP-DI sense, or a large community. Treat it as a library you own: pin the version, isolate it behind your own container interface, and keep the surface area small. If the goal is "make our Laravel app's DI nicer," this is the wrong tool and the answer is no. If the goal is "ship a package or service that must run outside Laravel," this is a reasonable, low-cost candidate worth a spike.
How can I help you explore Laravel packages today?