lint/php-config
PHPStan or Psalm and a formatter are configured
| Severity | warning |
| Tiers | all |
| Stacks | php |
| Scope | each |
| Kind | expr |
| Source | library v0.0.0-20261011205826-ecb4e9b3ffd4 |
| Selected by | fleetlint-recommended@0.1.0 |
Requirement
PHPStan (phpstan.neon.dist, level max with strict rules) or Psalm, plus PHP CS Fixer, Pint or PHP_CodeSniffer, all configured in the repository and run by the lint target.
Why
PHP’s type system is enforced at runtime only; the analyzer is the compile step the language lacks.
Check
(exists("phpstan.neon*") || exists("phpstan.dist.neon") || file("psalm.xml") || file("psalm.xml.dist")) && (exists(".php-cs-fixer*.php") || file("pint.json") || exists("phpcs.xml*") || exists(".php_cs*"))Fix
Add phpstan.neon.dist, .php-cs-fixer.dist.php and the packages in require-dev (fleetlint fix --apply does all three).
Agent instruction: Add phpstan.neon.dist and .php-cs-fixer.dist.php from the templates, require phpstan/phpstan, phpstan/phpstan-strict-rules and friendsofphp/php-cs-fixer in require-dev, and fix what they report.
fleetlint fix can apply this rule’s fix automatically (3 action(s)).
See: https://fleetlint.org/stacks/#php
Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.