PHPackages                             gephart/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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. gephart/dependency-injection

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

gephart/dependency-injection
============================

Gephart DependencyInjection Component

0.5.1(1y ago)468314MITPHPPHP &gt;=7.4

Since Feb 4Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (9)Used By (4)

Gephart Dependecy Injection
===========================

[](#gephart-dependecy-injection)

[![php](https://github.com/gephart/dependency-injection/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/gephart/dependency-injection/actions)

Dependencies
------------

[](#dependencies)

- PHP &gt;= 7.4
- psr/container == 2.0.2

Instalation
-----------

[](#instalation)

```
composer require gephart/dependency-injection
```

Using
-----

[](#using)

```
class A
{
    public function hello(string $world): string
    {
        return "hello " . $world;
    }
}

class B
{
    private $a;

    public function __construct(A $a)
    {
        $this->a = $a;
    }

    public function render()
    {
        return $this->a->hello("world");
    }
}

$container = new \Gephart\DependencyInjection\Container();
$b = $container->get(B::class);
$b->render(); // hello world
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

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

Recently: every ~657 days

Total

8

Last Release

697d ago

PHP version history (3 changes)v0.1PHP &gt;=7.0

0.4PHP &gt;=7.1

0.5.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ba9a3cad30ba7a773289e9da52832255f6f5a1f2eaaaa25a464186a47cb8c23?d=identicon)[MichalKatuscak](/maintainers/MichalKatuscak)

---

Top Contributors

[![MichalKatuscak](https://avatars.githubusercontent.com/u/1405383?v=4)](https://github.com/MichalKatuscak "MichalKatuscak (27 commits)")

---

Tags

psrcontainerPSR-11gephart

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B3.7k](/packages/psr-container)[php-di/php-di

The dependency injection container for humans

2.8k48.9M991](/packages/php-di-php-di)

PHPackages © 2026

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