rollerworks/sf-container-injector
A Symfony component that injects services from the container into objects and controllers, enabling lazy setter-based dependency injection without constructor wiring. Useful for legacy code and optional dependencies.
Architecture fit
rollerworks/sf-container-injector is a Symfony 2-era convenience layer built around the Symfony DependencyInjection component, targeting controller/action-style injection into a Symfony ContainerInterface. Laravel's runtime is Illuminate\Container\Container with service providers, facades, contextual binding, and #[Bind]/#[Singleton] attributes — there is no Symfony container in the default request lifecycle.#[Autowire] attributes cover the same ground natively.Integration feasibility
composer require will almost certainly fail constraint resolution against any current Symfony component or a PHP 8.2+ platform pin.--ignore-platform-reqs forcing would push PHP 5-era code into a PHP 8 runtime with removed APIs (each(), old reflection idioms, dynamic property writes) as likely fatal errors rather than deprecations.Technical risk
Key questions
Stack fit
bind/singleton/when()->needs()->give() contextual binding, and constructor injection via the container's reflection-based autowiring. A Symfony container injector sits outside all of these and cannot participate in Laravel's scoped instances, Octane reset semantics, or queue worker lifecycle hooks.Migration path
Compatibility
composer.json constraints and a PHP 8.x platform before spending engineering hours; a 30-minute resolution spike is the only warranted investment.Illuminate\Contracts\Container\Container conformance, and lazy service providers all assume a single container.Sequencing
composer require in an isolated branch against the real platform pin; timebox to half a day.Maintenance
Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?