PHPackages                             digitalwindow/dependency-injection - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. digitalwindow/dependency-injection

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

digitalwindow/dependency-injection
==================================

Easy-to-use Dependency Injection in PHP

1.0.7(12y ago)4170MITPHPPHP &gt;=5.3.3

Since Feb 6Pushed 12y ago2 watchersCompare

[ Source](https://github.com/DigitalWindow/dependency-injection)[ Packagist](https://packagist.org/packages/digitalwindow/dependency-injection)[ RSS](/packages/digitalwindow-dependency-injection/feed)WikiDiscussions master Synced 2d ago

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

Awin\\DependencyInjection
=========================

[](#awindependencyinjection)

Dependency injection for PHP

Usage Examples
--------------

[](#usage-examples)

```
$injector = new \Awin\DependencyInjection\DependencyInjector;
$injector->configureDependencyParamValue('Foo', 'param1', 'value to use in constructor');
$injector->configureDependencyParamClass('Foo', 'param2', '\Bar');
$foo = $injector->get('Foo')';

```

Configuration-Free Usage
------------------------

[](#configuration-free-usage)

Simply type-hint the constructor parameters of your dependency, and you needn't offer any configuration information to the injector - it will use reflection to figure out what is needed.

E.g.:

```
class Foo
{
    public function __construct(Bar $param)
    {
        //...
    }
    //...
}
$foo = $injector->get('Foo'); // Constructor param retrieved recursively from
                              // injector at this point, based on type-hint.

```

[![Build Status](https://camo.githubusercontent.com/7bcc71c0bdc8e8891a79464dd943137be933b5123bf6202dc72fde140d857a98/68747470733a2f2f7472617669732d63692e6f72672f4469676974616c57696e646f772f646570656e64656e63792d696e6a656374696f6e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/DigitalWindow/dependency-injection)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 70% 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 ~8 days

Total

6

Last Release

4437d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48860baee510af34e8d93e2f9323888400c5339e3e2f030f9aad221ceebe24c9?d=identicon)[AgileTillIDie](/maintainers/AgileTillIDie)

---

Top Contributors

[![SamBurns-awin](https://avatars.githubusercontent.com/u/6714367?v=4)](https://github.com/SamBurns-awin "SamBurns-awin (14 commits)")[![AlexStansfield](https://avatars.githubusercontent.com/u/4319443?v=4)](https://github.com/AlexStansfield "AlexStansfield (6 commits)")

---

Tags

dependency-injectiondi

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[level-2/dice

A minimalist Dependency injection container (DIC) for PHP. Please note: 3.0+ is only compatible with PHP 7.0. The 2.0 branch is compatbile with PHP 5.6.

437730.3k17](/packages/level-2-dice)[php-di/invoker

Generic and extensible callable invoker

26857.8M56](/packages/php-di-invoker)[hyperf/di

A DI for Hyperf.

182.8M594](/packages/hyperf-di)[x-wp/di

The dependency injection container for WordPress

301.1k10](/packages/x-wp-di)

PHPackages © 2026

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