Practical Advanced Static Analysis
summary
Advanced static analysis actually finds real bugs and evolvability defects: tools like PHPStan and Psalm (about 230-240 rules each) run over code, use plugins for frameworks, and can generate a baseline file so a legacy repo reports only new issues. Examples: custom rules block test-only setId calls, enums/match get backported via value objects plus Psalm type assertions, CI runs shrink a codebase from ~4,000 to ~1,000 reported issues over two years and materially speeds safe refactoring.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:08The 4 stages of a team
- 2:09What is static analysis
- 3:09Static analysis examples
- 5:18Static analysis vs tests
- 6:20How do these tools work
- 8:50Running the tools
- 10:01Bugs
- 12:36Evolvability
- 15:25Type declarations
- 17:26Array keys
- 19:14Templates
- 21:18Summary
- 23:53Baseline
- 25:54Workflow
- 27:23Refactoring
- 29:01Static Analysis
- 34:23Refactor Code
- 38:08Custom Rules
- 41:48Conclusion
- 44:08Questions
related talks
55mSquash Bugs with Static Analysis
25mTypes & static analysis are good in PHP
53mStatic Analysis Saved My Code Tonight
47mStatic Code Analysis: Judging a Forest by Its Trees
39mPractical Static Analysis for Continuous Application Security
32mFrom Zero to Static Analysis Hero
58mSecurity Static Analysis - Avoiding an Angry Mob of Engineers
44mStatic analysis as an additional barrier against bugs
