league / container
A fast and intuitive dependency injection container.
Fund package maintenance!
philipobenito
Installs: 70 135 416
Dependents: 362
Suggesters: 8
Security: 0
Stars: 854
Watchers: 22
Forks: 103
Open Issues: 1
Requires
- php: ^8.1
- psr/container: ^2.0.2
Requires (Dev)
- nette/php-generator: ^4.1
- nikic/php-parser: ^5.0
- phpstan/phpstan: ^1.10.61
- phpunit/phpunit: ^10.5.45|^11.5.15
- roave/security-advisories: dev-latest
- scrutinizer/ocular: ^1.9
- squizlabs/php_codesniffer: ^3.9
Provides
Replaces
- orno/di: ~2.0
- 5.x-dev
- 5.0.1
- 5.0.0
- 4.x-dev
- 4.2.5
- 4.2.4
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.0
- 3.x-dev
- 3.4.1
- 3.4.0
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.x-dev
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
This package is auto-updated.
Last update: 2025-05-22 07:31:56 UTC
README
This package is compliant with PSR-1, PSR-2, PSR-12, PSR-4, PSR-11 and PSR-12. If you notice compliance oversights, please send a patch via pull request.
Install
Via Composer
composer require league/container
Requirements
The following versions of PHP are supported by this version.
- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4
Documentation
Container has full documentation, powered by Jekyll.
Contribute to this documentation in the docs/ sub-directory.
Testing
Testing includes PHPUnit and PHPStan (Level 7).
$ 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\Di
contributors
License
The MIT License (MIT). Please see License File for more information.