devmachine/services-injector-bundle
get()-style service access to annotation-based or type-hinted DI, aligning with Symfony 3.3+ best practices.get('service.id')), improving readability and maintainability.get() calls with constructor injection).Avoid if:
Consider if:
get() calls alongside constructor injection).For Executives:
"This bundle lets our PHP team inject services into controllers using annotations—cutting manual get() calls and reducing bugs from hardcoded service IDs. It’s a low-risk way to modernize legacy Symfony apps without rewrites, saving dev time and aligning with industry standards. Think of it as ‘autocomplete for services’: faster, cleaner, and future-proof."
For Engineers:
"If we’re stuck with Symfony <3.3 and want to phase out get('service.id') calls, this bundle lets us use annotations like @InjectService("service.id") to inject dependencies. It’s lightweight, leverages existing SensioFrameworkExtraBundle, and plays nicely with constructor injection. Tradeoff: Adds a tiny dependency, but avoids custom DI logic. Worth it if we’re already using annotations elsewhere."
For Architects: "This addresses technical debt in monolithic Symfony apps by standardizing service access. It’s a stepping stone to type-hinted DI (Symfony 3.3+) and integrates with existing annotation-based routing. Risk is minimal—MIT license, no dependents, and clear deprecation path. Recommend piloting in a non-critical module first."
How can I help you explore Laravel packages today?