~/talk

From Zero to Static Analysis Hero

Talkat Laracon EU 2025 · 2025-02-03..02-04· [testing, php]
slides:none on file

Claim: static analysis can catch the same runtime errors earlier by parsing code into an AST, traversing nodes, building a symbol repository and using PHPStan’s type system. Demonstration uses PHPStan level 5, implements a custom rule preventing unnecessary value() calls via node inspection, scope type checks and RuleErrorBuilder, runs across the repo and surfaces a real warning, and notes that Laran already supplies a more robust variant for Laravel projects.

AI-written summary · about

  1. 0:00Introduction
  2. 1:02What is static analysis
  3. 5:56Static analysis levels
  4. 9:55PHPStan for conformance
  5. 10:59How PHPStan works
  6. 14:51Custom PHPStan rule
  7. 28:41Extending PHPStan with Laravel
  8. 29:43Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.