Newest · Tools and testing · 14 min read
PHPStan on Legacy Code: Baselines, Levels, and Green CI
Add PHPStan to a legacy PHP codebase without halting feature delivery. Choose a starting rule level, generate a baseline, configure CI, and get to green.
- Why Legacy Applications Need Static Analysis
- Step 1: Installing PHPStan with Composer
- Step 2: Understanding PHPStan Rule Levels
- Step 3: Configuring phpstan.neon