~/talk

Tighten up your Drupal code using PHPStan

Talkat Florida DrupalCamp 2024 · 2024-02-23..02-25· [drupal, php, developer-experience]
links:none on file
slides:none on file

Static analysis with PHPStan plus the phpstan-drupal extension finds typos, undefined methods, deprecated APIs, wrong return types for entity storage and queries, render-array callable errors, and bad autoloading. Drupal core currently runs at level 1 and contributions run at level 0 on GitLab CI; the project is pushing to level 2 (and some maintainers use level 9 with bleeding edge and a Baseline). Setup is composer-based and you can auto-generate a Baseline with generate-baseline.

AI-written summary · about

  1. 0:00Introduction to PHPStan
  2. 2:17Why use PHPStan
  3. 9:26Analyzing code with PHPStan
  4. 11:15PHPStan vs other tools
  5. 14:08PHPStan Drupal extension
  6. 19:25PHPStan Drupal autoloading
  7. 22:34Service container and deprecations
  8. 24:44Render arrays and callbacks
  9. 26:50Stub files and generics
  10. 30:41Miscellaneous features
  11. 33:07Adding PHPStan to your project
  12. 36:20Resources and community
  13. 38:50Q&A session
~/search
type to search 6,518 conferences, 143,918 speakers and 192,133 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.