Bauhaus PHP Package - DI
, (*1)
, (*2)
Introduction
The goal of this package is to provide a simple way to register and to load
services that are the dependencies of other parts of your project code. In other
words, it is a pragmatic implementation of the Dependency Injection Container
pattern that supports shared
, lazy
and not shared
., (*3)
To understand how to use this Dependency Injection Container, read the
unit tests., (*4)
You can have a behavior summary of this Dependency Injection Container by
runing the tests using the testdox
option:, (*5)
$ vendor/bin/phpunit -c tests/config/phpunit.xml --testdox
See the Code Together section for more details., (*6)
Install
The easiest way to install is by using composer:, (*7)
$ composer require bauhaus/di:v0.*
Contribute
Did you find some problem or do you want to make this project better?, (*8)
- Did you find some problem? You can easy open an issue here
here
- Do you want to help coding? Read the next section and let's code together :)
Code Together
First you will need to clone this repository:, (*9)
$ git clone git@github.com:bauhausphp/di-container.git bauhausphp-di-container
$ cd bauhausphp-di-container
Second, you have to install the dependencies which are already with the versions
locked by the composer.lock. So, you just have to install them using
composer:, (*10)
composer install
Third, before starting code, you need to make sure that the tests pass. There
are unit that were implemented using phpunit framework.
To run them, use the following command:, (*11)
$ vendor/bin/phpunit -c tests/config/phpunit.xml