PHPackages                             toandp/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. toandp/di

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

toandp/di
=========

A simple PHP dependency injection container

v1.2.1(6y ago)14MITPHPPHP &gt;=5.3.0

Since Oct 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/toandp/di)[ Packagist](https://packagist.org/packages/toandp/di)[ Docs](https://github.com/toandp/di)[ RSS](/packages/toandp-di/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

PHP tdp/di
==========

[](#php-tdpdi)

PHP tdp/di is a small Dependency Injection Container for PHP.

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

[](#installation)

Before using PHP tdp/di in your project, add it to your `composer.json` file:

```
$ ./composer.phar require toandp/di "^1.0"
```

Usage
-----

[](#usage)

Creating a container is a matter of creating a `Container` instance:

```
use tdp\di\Container;

$container = new Container();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

5

Last Release

2410d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cb4c48d34569355f28807703b547a5baba1e9c85bdf4dca9151f36584e851af?d=identicon)[toandp](/maintainers/toandp)

---

Top Contributors

[![toandp](https://avatars.githubusercontent.com/u/45766814?v=4)](https://github.com/toandp "toandp (7 commits)")

---

Tags

apexdependency-injectiondiphpcontainerdependency-injectiondi

### Embed Badge

![Health badge](/badges/toandp-di/health.svg)

```
[![Health](https://phpackages.com/badges/toandp-di/health.svg)](https://phpackages.com/packages/toandp-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)
