code.phpstanPHPStan PHP static analysis
Runs PHPStan 2 over PHP files at level 5 (settings["code.phpstan"].level: 0-10 or "max"). The project's phpstan.neon(.dist) is ignored because it can declare bootstrapFiles, includes and extensions that execute PHP; PHPStan instead gets a generated config listing the files, and runs from an empty temp directory so it never requires the project's Composer autoloader (vendor/autoload.php), which it otherwise loads from the working directory. Analysis is then purely static: no target code runs. An installed vendor/ directory is only scanned statically for symbols; without one, unknown classes and functions are reported with low confidence. Files that do not parse are reported and the rest re-analysed.
- Engine
- Wrapped scanner
- Wraps
phpstan- Targets
- Codebase
- Areas
- Reliability, Maintainability
- Runs
- By default, when the target applies
- Network
- Only the target itself
Run only this auditor
bunx @openaudit/cli . --only code.phpstanWraps phpstan. When it isn't installed, the auditor is skipped with an install hint and the rest of the audit runs.