[PHPStan] Constante BASE_PATH non reconnue dans auth.php et db.php #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Erreurs PHPStan détectées
src/auth.php:6—Constant BASE_PATH not foundsrc/db.php:5—Constant BASE_PATH not foundCause
BASE_PATHest définie à runtime danspublic/index.php(define("BASE_PATH", ...)) mais PHPStan ne peut pas le savoir lors de l'analyse statique desrc/.Correction
Ajouter un fichier bootstrap PHPStan dans
phpstan.neon:avec
phpstan-bootstrap.phpqui définit la constante.Détecté par PHPStan level 5 — baseline commit
70304d3