PHPStan🔗
Why ?🔗
Because sometimes only having php-cs-fixer dont tell us if we made mistakes in our codes
Installation🔗
1 | |
Create / Copy the phpstan.neon.dist file provided here
Usage🔗
Add the following target in your Makefile
1 2 3 4 5 | |
You need to clear & warmup the cache before running phpstan, as it need knowledge about your services definitions.
Extension used🔗
phpstan/phpstan-doctrine: improve integration with doctrinephpstan/phpstan-phpunit: improve integration with phpunit & phpunit mockphpstan/phpstan-strict-rules: because the levelmaxis not always enoughphpstan/phpstan-symfony: improve integration with symfonyekino/phpstan-banned-code: fail if we useecho,var_dumpor other functionjangregor/phpstan-prophecy: improve integration with prophecy
Last update: October 14, 2025