PHPackages                             ua1-labs/firedi - 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. ua1-labs/firedi

Abandoned → [sdfcloud/di](/?search=sdfcloud%2Fdi)Library[Utility &amp; Helpers](/categories/utility)

ua1-labs/firedi
===============

FireDI is a powerful and light weight PHP dependency injection library.

2.1.4(6y ago)3681MITPHP

Since Feb 23Pushed 6y ago3 watchersCompare

[ Source](https://github.com/rustygoldcoin/firedi)[ Packagist](https://packagist.org/packages/ua1-labs/firedi)[ RSS](/packages/ua1-labs-firedi/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (3)Versions (23)Used By (1)

FireDI - PHP Dependency Injection (DI)
======================================

[](#firedi---php-dependency-injection-di)

A light weight PHP dependency injection library featuring automatic, constructor based, dependency resolution. When you need a new object from a class definition just simply ask for it. Any dependencies type hinted on the constructor will be resolved and injected before the class is instantiated into an object.

The whole reason for FireDI to exist is to manage and resolve dependencies for you. The Dependency Injection design pattern provides you with the ability to decouple class dependencies across your entire application by resolving these dependencies for you.

Features:

- Automatic constructor based dependency resolution. Dependencies can be resolved automatically for you by type hinting the object you expect to be injected in the constructor.
- Circular dependency detection.
- Automatic object caching. So that when you ask for an object more than once, it is provided without having to run through the process of dependency resolution.
- The ability to define your own dependencies within the DI container. This works great for mocking dependencies within unit/integration tests.
- Ability to define your own dependencies for the situation where you need to get a class with specific dependencies that are not defined within the container.

Documentation
-------------

[](#documentation)

Install FireDI Using Composer
-----------------------------

[](#install-firedi-using-composer)

```
composer require ua1-labs/firedi

```

Getting Started
---------------

[](#getting-started)

Let's say you would like to get an instantiated object `MyClass1`. Well `MyClass1` requires that you pass into its constructor `MyClass2`. FireDI will resolve `MyClass2` and automatically inject it into `MyClass1` and return the instantiated object `MyClass1` to you.

**MyClass1**

```
class MyClass1
{
    public function __construct(MyClass2 $myClass2) {}
}

```

**MyClass2**

```
class MyClass2 {}

```

**FireDI In Action**

```
// instantiate firedi
$firedi = new UA1Labs\Fire\Di();

// obtain an object and have it's dependencies resolved for you
$myClass1 = $firedi->get('MyClass1');

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~262 days

Total

22

Last Release

2361d ago

Major Versions

0.9.0 → 1.0.02016-12-01

1.1.0 → 2.0.02019-10-11

PHP version history (2 changes)0.1.0PHP &gt;=5.5.0

0.2.2PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/011120e2cbda7f8b2ff3cc55ee097b334b2498d4887517d9ae36d91ebe76f7cc?d=identicon)[thebytebar](/maintainers/thebytebar)

---

Top Contributors

[![joshua-johnson-disney](https://avatars.githubusercontent.com/u/181119147?v=4)](https://github.com/joshua-johnson-disney "joshua-johnson-disney (13 commits)")[![dorgan](https://avatars.githubusercontent.com/u/464851?v=4)](https://github.com/dorgan "dorgan (12 commits)")[![NathanGiesbrecht](https://avatars.githubusercontent.com/u/1516627?v=4)](https://github.com/NathanGiesbrecht "NathanGiesbrecht (2 commits)")

---

Tags

dependency-injectiondifiredependency injectorfirestudioua1labsua1-labsua1firedi

### Embed Badge

![Health badge](/badges/ua1-labs-firedi/health.svg)

```
[![Health](https://phpackages.com/badges/ua1-labs-firedi/health.svg)](https://phpackages.com/packages/ua1-labs-firedi)
```

###  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)[x-wp/di

The dependency injection container for WordPress

301.1k10](/packages/x-wp-di)[sciactive/requirephp

An implementation of dependency injection (like RequireJS) in PHP.

241.0k1](/packages/sciactive-requirephp)

PHPackages © 2026

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