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 levelmax
is not always enoughphpstan/phpstan-symfony
: improve integration with symfonyekino/phpstan-banned-code
: fail if we useecho
,var_dump
or other functionjangregor/phpstan-prophecy
: improve integration with prophecy
Last update: December 20, 2024