PHPackages                             zorac/phpstan-php-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. [Testing &amp; Quality](/categories/testing)
4. /
5. zorac/phpstan-php-di

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

zorac/phpstan-php-di
====================

Extansion adding support for PHP-DI to PHPStan.

1.0.1(1y ago)149.5k↓33.2%11MITPHPPHP ^8.0

Since Jul 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zorac/phpstan-php-di)[ Packagist](https://packagist.org/packages/zorac/phpstan-php-di)[ Docs](https://www.github.com/zorac/phpstan-php-di/)[ RSS](/packages/zorac-phpstan-php-di/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

PHPStan PHP-DI
==============

[](#phpstan-php-di)

[![Software license](https://camo.githubusercontent.com/e118f4d1d56831a9ee5d80debffd5a16f7025cc5d9d2259c73f65b6d37fcada3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a6f7261632f7068707374616e2d7068702d64692e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![PHP version](https://camo.githubusercontent.com/b35d6af77ab834102d6fa98abf4713d92c03ec6d9e31dfbbf7dc29e5b7c9a049/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a6f7261632f7068707374616e2d7068702d64692e7376673f7374796c653d666c61742d737175617265)](https://www.php.net/)[![Latest release](https://camo.githubusercontent.com/91260ca4f492d8684550b8dd83ef56d906a6723200481300d5a8dc26794e03bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a6f7261632f7068707374616e2d7068702d64692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zorac/phpstan-php-di)

A PHPStan extension to support PHP-DI.

Features
--------

[](#features)

- Instance properties with a PHP-DI `#[Inject]` attribute will be recognized as always written.

Installation
------------

[](#installation)

First, install the package via composer as a development dependency:

```
composer require --dev zorac/phpstan-php-di
```

Then add the extension to the `includes` sectiopn of your `phpstan.neon`:

```
includes:
  - ./vendor/zorac/phpstan-php-di/extension.neon
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance40

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~539 days

Total

2

Last Release

510d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2768ebe682a76e86ee591ffccbf100c4f2927c61bce46a955cbf7444585ededa?d=identicon)[zorac](/maintainers/zorac)

---

Top Contributors

[![zorac](https://avatars.githubusercontent.com/u/1845517?v=4)](https://github.com/zorac "zorac (3 commits)")[![menno-ll](https://avatars.githubusercontent.com/u/50165380?v=4)](https://github.com/menno-ll "menno-ll (1 commits)")

---

Tags

phpphp-diphpstanphpstan-extensionPHPStanphp-di

### Embed Badge

![Health badge](/badges/zorac-phpstan-php-di/health.svg)

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

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[ekino/phpstan-banned-code

Detected banned code using PHPStan

2925.6M92](/packages/ekino-phpstan-banned-code)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

3462.2M52](/packages/shipmonk-dead-code-detector)[szepeviktor/phpstan-wordpress

WordPress extensions for PHPStan

3287.8M898](/packages/szepeviktor-phpstan-wordpress)[staabm/phpstan-dba

2912.3M2](/packages/staabm-phpstan-dba)[staabm/phpstan-todo-by

1991.8M55](/packages/staabm-phpstan-todo-by)

PHPackages © 2026

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