~/talk

Tuning PHPStan to Maximum Strictness

Talkat Dutch PHP Conference 2024 · 2024-03-12..03-15· [php, developer-experience]
slides:none on file

Explains how PHPStan enforces strictness by using rule levels 0–9 (level 6 forces missing type hints, 7 flags partially wrong unions, 8 flags nullable misuse, 9 enforces mixed handling), the baseline feature to ignore existing errors while reporting new ones, and the PHPStan Strict Rules package that demands booleans in conditions, forbids empty and loose == comparisons, requires === or strict in_array calls, and disallows dynamic $$ usage and loop-scoped variable leakage; covers check_uninitialized_properties, implicit mixed checks, pure vs impure function handling, bleeding-edge list types, and framework extensions like Doctrine.

AI-written summary · about

  1. 0:00PHPStan introduction
  2. 2:32PHPStan rule levels
  3. 10:00Baseline feature
  4. 11:49Strict opinionated checks
  5. 23:04Implicit mixed types
  6. 23:47Pure vs impure functions
  7. 30:38Type strictness options
  8. 31:40Bleeding edge features
  9. 38:24Performance benefits
  10. 39:07PHPStan extensions
  11. 43: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.