Files
PHPStan will run on files with the following extensions:.php
Configuration
PHPStan supports the following config files:phpstan.neonphpstan.neon.distphpstan.dist.neon
What CodeRabbit runs
PHPStan runs in a sandbox with the project config if present; we parse and validate the config before execution.Security policy and restrictions
- We reject
phpstan.neon/phpstan.neon.distthat declarebootstrapFileorbootstrapFilesto prevent executing arbitrary project bootstrap code. - Blocked configuration keys include:
bootstrapFilesbootstrapFile
When we skip PHPStan
CodeRabbit will skip running PHPStan when:- No config file is found (
phpstan.neon,phpstan.neon.dist, orphpstan.dist.neon). - The config file does not contain a
paths:parameter. - The config contains
bootstrapFileorbootstrapFiles. - PHPStan is already running in GitHub workflows.
- Config parsing fails or appears unsafe.