camspiers/shared-dependency-injection

There is no license information available for the latest version (0.4.4) of this package.

Shared Dependency Injection

0.4.4 2013-10-10 20:19 UTC

This package is auto-updated.

Last update: 2024-11-19 13:52:06 UTC


README

Build Status

Provides the ability to build a symfony dependency injection container which multiple unrelated module or libraries add their extensions and compiler passes to.

Installation (with composer)

$ composer require camspiers/shared-dependency-injection:~0.2

Usage

use Camspiers\DependencyInjection\SharedContainerFactory;

SharedContainerFactory::requireExtensionConfigs(__DIR__ . '/..');

SharedContainerFactory::dumpContainer(
    $container = SharedContainerFactory::createContainer(
        array(),
        __DIR__ . '/services.yml'
    ),
    'SharedContainer',
    __DIR__
);

Unit testing

shared-dependency-injection/ $ composer install --dev
shared-dependency-injection/ $ vendor/bin/phpunit