dmitrivereshchagin/yii2-psr-container

PSR-11 container adapter for Yii 2

v1.0.0 2017-03-14 21:02 UTC

This package is not auto-updated.

Last update: 2024-12-07 21:12:10 UTC


README

PSR-11 container adapter for Yii 2.

Install

% composer require dmitrivereshchagin/yii2-psr-container

Usage

\Yii::$container->setSingleton(
    'Psr\Container\ContainerInterface',
    function ($container) {
        return new \yii\psr\container\ContainerAdapter($container);
    }
);

Testing

% composer test