~/talk

Types & static analysis are good in PHP

Talkat Laracon AU 2019 · on Thursday, 2019-10-31· [php, testing]
slides:none on file

Types and static analysis reduce bugs by making concrete claims about values and APIs and by catching mismatches before deploy. Tools used include PHPStan, Psalm, Larastan and Rector and Vimeo’s Sam to infer generics and extra type info. A legacy run exposes ~10,000 static errors but baselines let teams enforce only new code. Rector automates many refactorings (add return types, convert singletons) and Sam finds collection/generic mismatches; CI integration prevents regressions. Slides: https://laracon.com.au/slides/2019/sam-greenwood.pdf

AI-written summary · about

  1. 0:00Start
  2. 0:21SAM GREENWOOD @SAMTGREENWOOD
  3. 0:40WITH TYPES
  4. 1:34STATIC TYPES DEFINED BEFORE WE USE THEM
  5. 2:20STRONG TYPES CAN NEVER CHANGE
  6. 4:08TYPES SHOW INTENT
  7. 5:22TYPES MAKE YOUR CODE EASIER TO READ
  8. 8:04WHAT IS STATIC ANALYSIS?
  9. 8:39STATIC ANALYSIS IN
  10. 9:37STATIC ANALYSIS SUCKS UNLESS IT KNOWS ABOUT YOUR CODE
  11. 10:04PROVIDE TYPES WHERE YOU CAN
  12. 21:45DON'T USE UNNECESSARY DOC BLOCKS!
  13. 24:25THERE ARE NO SOLUTIONS ONLY TRADEOFFS.
~/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.