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)161.2k↓68.9%12MITPHPPHP ^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 2d ago

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

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 81% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

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

556d 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.5k55.4M8.4k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.2k](/packages/phpstan-phpstan-symfony)[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.

4853.5M91](/packages/shipmonk-dead-code-detector)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[ekino/phpstan-banned-code

Detected banned code using PHPStan

3016.2M119](/packages/ekino-phpstan-banned-code)

PHPackages © 2026

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