PHPackages                             jetfirephp/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. [Framework](/categories/framework)
4. /
5. jetfirephp/di

ActiveLibrary[Framework](/categories/framework)

jetfirephp/di
=============

JetFire - Dependency Injection Container

2132PHP

Since Jan 8Pushed 9y agoCompare

[ Source](https://github.com/jetfirephp/di)[ Packagist](https://packagist.org/packages/jetfirephp/di)[ RSS](/packages/jetfirephp-di/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

JetFire Dependency Injection Container
--------------------------------------

[](#jetfire-dependency-injection-container)

Di is a minimalist Dependency Injection Container for PHP inspired from [Dice](https://github.com/Level-2/Dice).

### Installation

[](#installation)

Via [composer](https://getcomposer.org)

```
$ composer require jetfirephp/di
```

### Basic Usage

[](#basic-usage)

```
// Require composer autoloader
require __DIR__ . '/vendor/autoload.php';

$rules = [
    'account' => [
        'use' => 'Account',
        'rule' => [
            'shared' => true,
        ]
    ],
    'amount' => [
        'use' => 'Amount',
    ],
];

$di = new Di();
$di->registerCollection($rules);

$account1 = $di->get('account'); // instance of Account
$account2 = $di->get('account');
var_dump($account1 === $account2) //true

$amount1 = $di->get('amount');
$amount2 = $di->get('amount');
var_dump($amount1 === $amount2) //false

```

### License

[](#license)

The JetFire Di is released under the MIT public license : .

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6923318?v=4)[JetfirePHP](/maintainers/jetfirephp)[@jetfirephp](https://github.com/jetfirephp)

---

Top Contributors

[![mewgan](https://avatars.githubusercontent.com/u/17544034?v=4)](https://github.com/mewgan "mewgan (2 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M840](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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