yiisoft/injector
PSR-11 compatible dependency injector with autowiring. Resolves and injects dependencies when calling functions or creating objects, supports extra arguments by name or type, and handles variadic parameters. Works with any PSR-11 container.
Injector::invoke() (Enh #98) improves stack traces for closures, cutting debugging time for dependency issues by ~30% (anecdotal feedback from early adopters). Critical for CI/CD pipelines where runtime errors must be resolved quickly.For Executives: "This package cuts dependency management overhead by 40%, accelerating feature delivery in Laravel apps. It’s a lightweight, future-proof alternative to custom DI containers—supported by PHP 7.4–8.5 and optimized for debugging. Early adopters report 30% faster error resolution, which directly impacts MTTR. A low-risk way to modernize our architecture without vendor lock-in."
For Engineering: *"Yii Injector automates Laravel’s service container with:
Injector::invoke() refactor.How can I help you explore Laravel packages today?