zapheus/psr-11-bridge

PSR-11 bridge for Zapheus framework.

dev-master / 1.0.x-dev 2020-09-12 14:21 UTC

This package is auto-updated.

Last update: 2024-10-20 23:26:12 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Converts PSR-11 containers to Zapheus containers and vice versa. Also contains an implementation of PSR-11.

Installation

Install PSR-11 Bridge via Composer:

$ composer require zapheus/psr-11-bridge

Basic Usage

PSR-11 to Zapheus

Install a PSR-11 compliant package first (e.g League Container):

$ composer require league/container
use Zapheus\Bridge\Psr\Zapheus\Container;

$psr = new League\Container\Container;

// ... set dependencies here

// Zapheus\Container\ContainerInterface
$container = new Container($psr);

Zapheus to PSR-11

use Zapheus\Bridge\Psr\Interop\Container;

$zapheus = new Zapheus\Container\Container;

// ... set dependencies here

// Psr\Container\ContainerInterface
$container = new Container($zapheus);

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Credits

License

The MIT License (MIT). Please see LICENSE for more information.