sanmai/di-container
Lightweight PSR-11 compatible dependency injection container for PHP. Supports autowiring via reflection, bindings and shared services, simple configuration, and fast resolution with minimal boilerplate—suitable for small apps and libraries needing a straightforward DI container.
✅ When developing standalone libraries or microservices needing DI without framework dependencies
✅ For small-to-medium PHP projects prioritizing simplicity and minimal boilerplate
✅ When needing lazy instantiation or singleton services without heavy DI tooling
❌ When using Laravel/Symfony (built-in DI is superior for those frameworks)
❌ For enterprise-scale applications requiring advanced features like autowiring or complex lifecycle management
❌ If community support and long-term maintenance are critical (low stars indicate limited adoption)
Executives: "This lightweight DI container reduces technical debt by providing a proven, framework-agnostic solution for dependency management. It accelerates development cycles while ensuring maintainable code—saving costs and enabling faster feature delivery for small-to-medium projects."
Engineering: "With a minimal API for service registration and resolution, it integrates seamlessly without adding complexity. Features like lazy instantiation and singleton support make it perfect for libraries and micro-apps where
How can I help you explore Laravel packages today?