PHPackages                             mike-koch/php-di - 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. mike-koch/php-di

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

mike-koch/php-di
================

PHP-DI is a Container that makes Dependency Injection as practical as possible in PHP. This fork fixes an issue in 4.x that prevented it from working in PHP 7.1.

4.4.11(8y ago)0781↓75%MITPHPPHP &gt;=5.3.3

Since Sep 8Pushed 8y agoCompare

[ Source](https://github.com/mike-koch/PHP-DI)[ Packagist](https://packagist.org/packages/mike-koch/php-di)[ Docs](https://github.com/mike-koch/PHP-DI/)[ RSS](/packages/mike-koch-php-di/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

   layout home  PHP-DI is a Dependency Injection Container made for humans.

[![Build Status](https://camo.githubusercontent.com/63e7e76ed6d97fa313ca543d1eb57dbfe4af619873a652cab64080695fb4e668/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d6e61706f6c692f5048502d44492e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/mnapoli/PHP-DI)[![HHVM Status](https://camo.githubusercontent.com/22186380da2629bc962b969c105ebb2bf7f85d3b1bad99017eac0d93f044fe85/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f6d6e61706f6c692f5048502d44492e7376673f7374796c653d666c61742d737175617265)](http://hhvm.h4cc.de/package/mnapoli/php-di)[![Coverage Status](https://camo.githubusercontent.com/5ce14c2c5ca27d909fd09ed1f50a800a2e148300af3a834a9fc4873dfbf5c3ad/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6d6e61706f6c692f5048502d44492f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/mnapoli/PHP-DI?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/065d279551df457dd3cc2dba0d9427202860754c66a3b9f5a397b9b95a107a54/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d6e61706f6c692f5048502d44492e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/mnapoli/PHP-DI/?branch=master)[![Latest Version](https://camo.githubusercontent.com/60d5a075118cc1c355ff6f324cd55d67642624204e5eb47c573b2a72314d4f75/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6e61706f6c692f5048502d44492e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mnapoli/php-di)[![Total Downloads](https://camo.githubusercontent.com/8fcf27e6d1e5e6963c48e333b82abca7e264b66de95d4754f1f11658c5eee28d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6e61706f6c692f5048502d44492e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mnapoli/php-di)

[![Average time to resolve an issue](https://camo.githubusercontent.com/34bef458ad2e79ca26612d49bfb0fd961a6000140718aec05aca3f21e4bf0772/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f7265736f6c7574696f6e2f6d6e61706f6c692f5048502d44492e737667)](http://isitmaintained.com/project/mnapoli/PHP-DI "Average time to resolve an issue")[![Percentage of issues still open](https://camo.githubusercontent.com/5b46d58aef7bcd4bd408e56b2ac88ff7242c192d0ac80780955ebaa7e493cf0b/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f6f70656e2f6d6e61706f6c692f5048502d44492e737667)](http://isitmaintained.com/project/mnapoli/PHP-DI "Percentage of issues still open")

It is meant to be practical, powerful, and framework-agnostic.

Read more on the website: **[php-di.org](http://php-di.org)**

Join us in the Gitter chat room: [![Gitter chat](https://camo.githubusercontent.com/a3c265635c05e5e4072d318addda93162d32f006e4acfbc7aa27e4c3295c30a3/68747470733a2f2f6261646765732e6769747465722e696d2f6d6e61706f6c692f5048502d44492e706e67)](https://gitter.im/mnapoli/PHP-DI)

Support is always appreciated: ![Gratipay](https://camo.githubusercontent.com/9522a517d3addd469cc4f284220346e51a8ad14c891879b89f29aed4a997bc64/68747470733a2f2f696d672e736869656c64732e696f2f67726174697061792f4a53466964646c652e737667)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.6% 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

Unknown

Total

1

Last Release

3171d ago

### Community

Maintainers

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

---

Top Contributors

[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (735 commits)")[![domu1de](https://avatars.githubusercontent.com/u/1790055?v=4)](https://github.com/domu1de "domu1de (8 commits)")[![mike-koch](https://avatars.githubusercontent.com/u/333430?v=4)](https://github.com/mike-koch "mike-koch (5 commits)")[![jmalloc](https://avatars.githubusercontent.com/u/761536?v=4)](https://github.com/jmalloc "jmalloc (4 commits)")[![thispagecannotbefound](https://avatars.githubusercontent.com/u/5628997?v=4)](https://github.com/thispagecannotbefound "thispagecannotbefound (3 commits)")[![keosion](https://avatars.githubusercontent.com/u/9535169?v=4)](https://github.com/keosion "keosion (3 commits)")[![unkind](https://avatars.githubusercontent.com/u/1517363?v=4)](https://github.com/unkind "unkind (2 commits)")[![balihoo-jflitton](https://avatars.githubusercontent.com/u/5807460?v=4)](https://github.com/balihoo-jflitton "balihoo-jflitton (2 commits)")[![Potherca](https://avatars.githubusercontent.com/u/195757?v=4)](https://github.com/Potherca "Potherca (2 commits)")[![drdamour](https://avatars.githubusercontent.com/u/1514496?v=4)](https://github.com/drdamour "drdamour (2 commits)")[![cboden](https://avatars.githubusercontent.com/u/617694?v=4)](https://github.com/cboden "cboden (2 commits)")[![kdubois](https://avatars.githubusercontent.com/u/373537?v=4)](https://github.com/kdubois "kdubois (2 commits)")[![JonathanLydall](https://avatars.githubusercontent.com/u/1290262?v=4)](https://github.com/JonathanLydall "JonathanLydall (1 commits)")[![Bilge](https://avatars.githubusercontent.com/u/470626?v=4)](https://github.com/Bilge "Bilge (1 commits)")[![drealecs](https://avatars.githubusercontent.com/u/209984?v=4)](https://github.com/drealecs "drealecs (1 commits)")[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (1 commits)")[![avant1](https://avatars.githubusercontent.com/u/2902785?v=4)](https://github.com/avant1 "avant1 (1 commits)")[![lkysow](https://avatars.githubusercontent.com/u/1034429?v=4)](https://github.com/lkysow "lkysow (1 commits)")[![nishigori](https://avatars.githubusercontent.com/u/928692?v=4)](https://github.com/nishigori "nishigori (1 commits)")

---

Tags

containerdependency-injectiondi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mike-koch-php-di/health.svg)

```
[![Health](https://phpackages.com/badges/mike-koch-php-di/health.svg)](https://phpackages.com/packages/mike-koch-php-di)
```

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/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.

356968.3k58](/packages/aura-di)[mrclay/props-dic

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

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

A flexible dependency injection container

20260.4k6](/packages/slince-di)[capsule/di

A PSR-11 compliant autowiring dependency injection container.

2857.5k2](/packages/capsule-di)

PHPackages © 2026

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