php-kitchen / yii2-di
Advanced Dependency Injection container built on top of default Yii2 container.
Installs: 1 869
Dependents: 2
Suggesters: 0
Security: 0
Stars: 5
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- php: >=7.4
- yidas/yii2-bower-asset: 2.0.13.1
- yiisoft/yii2: >=2.0.38
Requires (Dev)
- php-kitchen/code-specs: ^4.0
- phpunit/phpunit: 9.5.*
README
Advanced Dependency Injection Container fo Yii 2.
Package information
Requirements
PHP >=7.4
is required.
Getting Started
Run the following command to add Yii2 Container to your project's composer.json
. See Packagist for specific versions.
composer require php-kitchen/yii2-di
Or you can copy this library from:
Then add following line of code in you application entry point or bootstrap file:
Yii::$container = new \PHPKitchen\DI\Container(); spl_autoload_unregister([\PHPKitchen\DI\autoload\ClassLoader::class, 'loadClass']);
For additional information and guides go to the project documentation
Upgrade from 0.0.9
In 0.1.0 yii\base\Object
changed to yii\base\BaseObject
to support PHP 7.2 but it means that you need yii 2.0.13
and higher.
Contributing
If you want to ask any questions, suggest improvements or just to talk with community and developers, join our server at Discord