Introducing PHP_CodeSniffer into an Existing Codebase to Make Life Easier!
summary
Describes adding PHP_CodeSniffer to a 16-year-old PHP codebase to reduce code review work by automating style checks. They created a PSR12-based XML ruleset extended with third-party checks and several custom sniffs, packaged as an internal composer package. To avoid CI noise from legacy violations, they implemented a three-run CI script that detects and enforces only newly introduced errors (including special handling for paired type-hint error codes).
AI-written summary · about
