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

ActiveLibrary[Framework](/categories/framework)

quetzal/dependency-injection
============================

Dependency Injection containers for Quetzal framework

v0.1.1(5y ago)09MITPHPPHP &gt;=7.3.0CI failing

Since Dec 20Pushed 5y agoCompare

[ Source](https://github.com/VoodooPrograms/di-container)[ Packagist](https://packagist.org/packages/quetzal/dependency-injection)[ RSS](/packages/quetzal-dependency-injection/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

features:

Create a container

```
use DI\DependencyInjection\Container;

$container = new Container();

```

Define a service

```
$container->set('service', function() {
   return new stdClass();
});

```

```
$container->set(Profiler::class);

```

```
use DI\DependencyInjection\ContainerBag;

$containerBag = new ContainerBag();
$containerBag[Profiler::class] = Profiler::class;

```

Get a service

```
$container->get('service')

```

```
$containerBag[Profiler::class]

```

Define a dependency by constructor

Profile service class. We have to set dependencies as types of parameters in the `__construct` method.

```
class Profiler implements IProfiler
{
    private $dep1;
    private $dep2;
    private $dep3;

    public function __construct(
        ProfilerDependencyA $dep1,
        ProfilerDependencyB $dep2,
        ProfilerDependencyC $dep3
    )
    {
        $this->dep1 = $dep1;
        $this->dep2 = $dep2;
        $this->dep3 = $dep3;
    }

    public function dump()
    {
        // TODO: Implement dump() method.
    }
}

```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

2

Last Release

2021d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23705516?v=4)[Bartosz Belski](/maintainers/VoodooPrograms)[@VoodooPrograms](https://github.com/VoodooPrograms)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[pestphp/pest

The elegant PHP Testing Framework.

11.6k72.2M20.5k](/packages/pestphp-pest)[bref/bref

Bref is a framework to write and deploy serverless PHP applications on AWS Lambda.

3.4k10.6M67](/packages/bref-bref)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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