liip/container-wrapper-bundle
Symfony bundle that provides a lightweight wrapper around the service container, letting you inject a container interface into services and fetch dependencies lazily without coupling code to Symfony's full container.
ContainerInterface/Container injection into application services at all, and what the code-review rule is (fail CI vs. warn).Illuminate\Contracts\Container\Container for framework-level code; if you genuinely need lazy access, write a small typed service locator you own — do not resurrect a Symfony bundle.ServiceLocatorTagPass, service subscribers, #[AutowireLocator], and the built-in container linting cover the same ground natively.Bottom line: decline as a dependency; adopt the idea as an internal guardrail.
To executives: We evaluated a candidate library and are recommending against it. It is a 2015-era bundle, formally deprecated and archived, with no downstream users and no security maintenance — zero cost avoided by declining, real risk avoided. The one durable idea behind it, making "inject everything" visible so it can be refactored, can be reproduced internally in about a day if we have that problem. No budget impact, no roadmap change; this is a governance win, not a feature.
To engineering: The package solved a real problem — teams injecting the whole container because explicit dependencies were painful — by wrapping it so usage could be tracked and ratcheted down. That problem is worth acknowledging, but the artifact is dead: Symfony now ships service locators and #[AutowireLocator], and on Laravel we have contextual binding and providers. Proposal: reject the dependency, add Deptrac/PHPStan rules that fail CI when the container is injected into domain services, and if a legacy module needs a transition period, ship a small observable wrapper with a written deprecation date. Measure adoption by counting container injections per module over time, not by whether the package is installed.
How can I help you explore Laravel packages today?