laminas/laminas-di
Dependency injection container for Laminas apps. Supports autowiring, configuration-driven definitions, factories, and runtime instantiation to manage object creation and wiring with minimal boilerplate. Integrates with Laminas ServiceManager patterns and PSR-friendly practices.
laminas-di provides a battle-tested, PSR-11-compliant solution with autowiring, reducing manual boilerplate.laminas-servicemanager) via code generators, supporting hybrid architectures.Adopt when:
Look elsewhere when:
laminas-servicemanager instead."laminas-di is a PSR-11 dependency injection container that automates wiring dependencies at runtime, cutting development time by 30–50% for new services. It’s lightweight, PHP 8.x-compatible, and integrates seamlessly with Laravel/Laminas ecosystems—reducing technical debt while future-proofing our stack. By adopting this, we avoid reinventing DI wheels, align with modern PHP practices, and enable faster feature delivery for microservices or modular apps. The package is actively maintained (releases up to PHP 8.5) and used by teams needing zero-config, high-performance DI."
*"This package solves autowiring for constructor injection—no manual bind() calls or factories needed. Key benefits:
laminas-servicemanager later).laminas-servicemanager for advanced use cases).Trade-offs:
laminas-servicemanager if needed).Proposal: Pilot in a new microservice or replace manual DI in a module to validate gains in developer velocity."*
How can I help you explore Laravel packages today?