league / container
A fast and intuitive dependency injection container.
Fund package maintenance!
5.2.0
2026-03-19 18:52 UTC
Requires
- php: ^8.1
- psr/container: ^2.0.2
- psr/event-dispatcher: ^1.0
Requires (Dev)
- nette/php-generator: ^4.1
- nikic/php-parser: ^5.0
- phpstan/phpstan: ^2.1.11
- phpunit/phpunit: ^10.5.45|^11.5.15|^12.0
- roave/security-advisories: dev-latest
- scrutinizer/ocular: ^1.9
- squizlabs/php_codesniffer: ^3.9
Provides
Replaces
- orno/di: ~2.0
This package is auto-updated.
Last update: 2026-05-20 20:08:36 UTC
README
This package is compliant with PER-CS, PSR-4 and PSR-11. If you notice compliance oversights, please send a patch via pull request.
Install
Via Composer
composer require league/container
Requirements
This version supports the following versions of PHP.
- PHP 8.3
- PHP 8.4
- PHP 8.5
Documentation
Container has full documentation, powered by Jekyll.
Contribute to this documentation in the docs/ subdirectory.
Testing
Testing includes Pest and PHPStan (Level 8).
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email philipobenito@gmail.com instead of using the issue tracker.
Credits
- Phil Bennett
- All Contributors
Orno\Dicontributors
License
The MIT Licence (MIT). Please see Licence File for more information.