PHPackages                             bauhaus/container - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. bauhaus/container

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

bauhaus/container
=================

Define and implement a simple container

v0.2.0(9y ago)0196[2 issues](https://github.com/bauhausphp/container/issues)MITPHPPHP &gt;=7.1

Since Dec 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bauhausphp/container)[ Packagist](https://packagist.org/packages/bauhaus/container)[ RSS](/packages/bauhaus-container/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (6)Used By (0)

Bauhaus PHP - Package Container
===============================

[](#bauhaus-php---package-container)

[![Latest Stable Version](https://camo.githubusercontent.com/fde22c28661240bc004ec928767185e90140229ef667e59ac36a1c7b2af7f135/68747470733a2f2f706f7365722e707567782e6f72672f626175686175732f636f6e7461696e65722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bauhaus/container)[![Latest Unstable Version](https://camo.githubusercontent.com/cd3e48105b5f9c5e2ba24960e87d02f57128a4ba22841896c4cd3ff89d3ffd64/68747470733a2f2f706f7365722e707567782e6f72672f626175686175732f636f6e7461696e65722f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bauhaus/container)[![Total Downloads](https://camo.githubusercontent.com/c88a061dd6e82364d0a7af68224d3770425e2cd88ae27ea17d6efa0614ff0517/68747470733a2f2f706f7365722e707567782e6f72672f626175686175732f636f6e7461696e65722f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/bauhaus/container)[![License](https://camo.githubusercontent.com/f331b526dd4501da40c05284f6f44c8e58f751c0c78e1a2c31167bbe351e6f6b/68747470733a2f2f706f7365722e707567782e6f72672f626175686175732f636f6e7461696e65722f6c6963656e73653f666f726d61743d666c61742d737175617265)](LICENSE)

[![Build Status](https://camo.githubusercontent.com/ed2034b8b38eb0e38720b169f1f1de265c836e0fd1ee5b38afa1d89d95e5b793/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f626175686175737068702f636f6e7461696e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bauhausphp/container)[![Coverage Status](https://camo.githubusercontent.com/d4fb1b8a65c2cc4b27ab75dafd3e76f1832dbfab614b5f37f4ac6f3043252da9/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f626175686175737068702f636f6e7461696e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/bauhausphp/container?branch=master)[![Codacy Badge](https://camo.githubusercontent.com/843a71a71c38af0f03862f953d3e81b1c570881a85f7f44645d4fd26c4262035/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f39653462663164386136653634396231623438633561323235316431633738652e7376673f7374796c653d666c61742d737175617265)](https://www.codacy.com/app/fefas/bauhausphp-container)

Introduction
------------

[](#introduction)

The goal of this package is to provide useful container which can be used as superclass to create more complex implementations.

To understand how to work with the container, read the [unit tests](https://github.com/bauhausphp/package-container/blob/master/tests/unit/ContainerTest.php)implemented using [phpunit](https://phpunit.de/).

> You can have a behavior summary of this *Dependency Injection Container* by runing the tests using the `testdox` option:
>
> ```
> $ vendor/bin/phpunit -c tests/config/phpunit.xml --testdox
>
> ```
>
>
>
> See the *[Code Together](#code-together)* section for more details.

Install
-------

[](#install)

The easiest way to install it is by using [composer](https://getcomposer.org/):

```
$ composer require bauhaus/container:dev-master

```

Contribute
----------

[](#contribute)

1. Did you find some problem? You can easy open an issue [here](https://github.com/bauhausphp/package-container/issues/new)
2. Do you want to help coding? Read the next section and let's code together :)

Code Together
-------------

[](#code-together)

First you will need to clone this repository:

```
$ git clone git@github.com:bauhausphp/package-container.git bauhausphp-package-container
$ cd bauhausphp-package-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](https://getcomposer.org/):

```
$ composer install

```

Third, before starting code, you need to make sure that the tests pass. There are *unit* that were implemented using [phpunit](https://phpunit.de/) framework. To run them, use the following command:

```
$ vendor/bin/phpunit -c tests/config/phpunit.xml

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

3463d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e02f16abf8dcb9c7e0bbd66c3ccd5e01821b12e70eee6f0f38a727f204d07f37?d=identicon)[fefas](/maintainers/fefas)

---

Top Contributors

[![fefas](https://avatars.githubusercontent.com/u/6557756?v=4)](https://github.com/fefas "fefas (108 commits)")

---

Tags

composercontainerimmutablephpphpunitpsr-11containerbauhaus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bauhaus-container/health.svg)

```
[![Health](https://phpackages.com/badges/bauhaus-container/health.svg)](https://phpackages.com/packages/bauhaus-container)
```

###  Alternatives

[ramunasd/symfony-container-mocks

Provides extended Symfony dependency injection container enabling service mocking.

2297.0k2](/packages/ramunasd-symfony-container-mocks)[bex/behat-magento2-extension

Magento2 extension for Behat

11112.3k](/packages/bex-behat-magento2-extension)[jtreminio/zimple

A wrapper for Pimple container that adds several useful features to make it easier to manage your code!

101.4k](/packages/jtreminio-zimple)[michaels/data-manager

Simple data manager for nested data, dot notation array access, extendability, and container interoperability.

121.9k2](/packages/michaels-data-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
