PHPackages                             systream/dependency-injection-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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. systream/dependency-injection-container

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

systream/dependency-injection-container
=======================================

1.2.1(8y ago)149MITPHPPHP ^5.4 || ^7.0

Since Nov 1Pushed 8y ago2 watchersCompare

[ Source](https://github.com/systream/dependency-injection-container)[ Packagist](https://packagist.org/packages/systream/dependency-injection-container)[ RSS](/packages/systream-dependency-injection-container/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Repository
==========

[](#repository)

For saving models with repository pattern.

Installation
------------

[](#installation)

You can install this package via [packagist.org](https://packagist.org/packages/systream/dependency-injection-container) with [composer](https://getcomposer.org/).

`composer require systream/dependency-injection-container`

composer.json:

```
"require": {
    "systream/dependency-injection-container": "1.*"
}
```

This library requires `php 5.6` or higher, but also works on php 5.4.

Usage
-----

[](#usage)

```
$di = new DependencyInjectionContainer();
$di->bind(FixtureTestInterface::class, function () {
	return new ObjectA();
});

$di->has(FixtureTestInterface::class); // will return true

$instance = $di->get(FixtureTestInterface::class); // will return ObjectA instance
```

### Create

[](#create)

```
class TestObjectB {
	public function __construct(FixtureTestInterface $test) {
	}
}

$di = new DependencyInjectionContainer();
$di->bind(FixtureTestInterface::class, function () {
	return new ObjectA();
});

$testObject = $di->create(TestObjectB::class);
```

Test
----

[](#test)

[![Build Status](https://camo.githubusercontent.com/415828f04e598cf59366422f5bfcd22deda18be1070021ef054c55392c1294d3/68747470733a2f2f7472617669732d63692e6f72672f737973747265616d2f646570656e64656e63792d696e6a656374696f6e2d636f6e7461696e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/systream/dependency-injection-container)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~77 days

Total

5

Last Release

3217d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0 || &gt;= 7.0

1.2.1PHP ^5.4 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c5ea6e7d8143a1fba541e1f41419cf36a4f970806d4bd91094d3b46177aea6d?d=identicon)[systream](/maintainers/systream)

---

Top Contributors

[![systream](https://avatars.githubusercontent.com/u/1583029?v=4)](https://github.com/systream "systream (9 commits)")

---

Tags

containerdependency-injectiondependency management

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/systream-dependency-injection-container/health.svg)

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

###  Alternatives

[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k133.2M1.4k](/packages/pimple-pimple)[php-di/php-di

The dependency injection container for humans

2.8k53.2M1.2k](/packages/php-di-php-di)[aura/di

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

352982.2k60](/packages/aura-di)[acclimate/container

Provides adapters for various third-party service containers.

219394.9k15](/packages/acclimate-container)[mrclay/props-dic

Props is a simple DI container that allows retrieving values via custom property and method names

3512.4M3](/packages/mrclay-props-dic)[slince/di

A flexible dependency injection container

20268.4k6](/packages/slince-di)

PHPackages © 2026

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