Moving Towards Better Coding Standards
summary
A tool called Coverage Checker runs existing linters and analyzers (phpcs, phpmd, phpstan, phan, phpunit, etc.) and compares each tool’s report to the git diff so only errors in changed lines fail a build, letting teams enforce standards on new code or require a percentage (for example 80%) of changed lines to pass. It installs as a composer package or standalone, works for other languages, speeds CI (example run 277s → 26s on changed files) and cuts PSR-2 errors ~40% and average complexity from ~15 to ~12.
AI-written summary · about
chapters (20)
- 0:00Introduction and speaker background
- 1:28What coding standards mean
- 3:16Why coding standards matter
- 5:06Existing tools for PHP standards
- 8:40Legacy code challenges
- 12:12Solution for legacy code enforcement
- 14:43Generating and filtering diffs
- 16:51Enforcing PHPMD standards
- 17:56PHPUnit code coverage enforcement
- 19:03Results after one year
- 20:50Approaches to legacy cleanup
- 22:33Requirements for success
- 23:38Flexibility and pragmatism
- 25:42Optimizing CI performance
- 27:47Ordering CI jobs efficiently
- 28:48Simplifying Travis setup
- 29:53PHPUnit plugin for faster tests
- 31:19Beyond PHP standards
- 32:03Open source contribution tips
- 32:46Q&A session
