league/container
league/container is a lightweight PSR-11 dependency injection container for PHP. Define entries, factories, and autowiring-friendly services to manage application dependencies cleanly, with modern PHP support and solid tooling for testing and analysis.
DatabaseService, LoggerService).new instantiations in spaghetti code with injectable interfaces.ServiceProvider pattern.Adopt When:
Look Elsewhere When:
symfony/dependency-injection for advanced features like parameter bags).php-di/php-di).ServiceProvider offers.*"League/Container is a minimalist, high-performance dependency injection tool that lets our PHP teams decouple components without locking into Laravel’s ecosystem. It’s PSR-11 compliant, meaning it integrates seamlessly with modern PHP tools, and its lightweight design reduces overhead in microservices or APIs. By adopting this, we can:
*"This is a batteries-included but not over-engineered DI container. Key wins:
How can I help you explore Laravel packages today?