A PHPStan extension to support PHP-DI.
- Instance properties with a PHP-DI
#[Inject]
attribute will be recognized as always written.
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