Introducing PHPStan from Scratch into a 20‑Year‑Old Legacy Product
summary
Adds PHPStan to a 20‑year legacy PHP product by making Composer autoload the default where possible, providing a bootstrap file to load legacy require paths and .din files, and rewriting hardcoded require paths instead of using symlinks. Uses PHPStan’s baseline feature to ignore historical issues; initial scans reported ~271 errors at level 0 (rising to thousands at higher levels) and later stabilized to 759 errors at level 0 and 61,837 at level 1. Continuous integration is not yet wired, but static analysis can now run after those fixes.
AI-written summary · about
