~/talk

PHP to Hack, an incrementally typed Adventure at Slack

Talkat International PHP Conference Spring 2019 · 2019-06-03..06-07· [php]
links:none on file
slides:none on file

Slack migrates a multi‑million‑line PHP codebase to Hack starting in 2016, runs static checking with HH client via LSP, and finds thousands of real bugs during the one‑file‑at‑a‑time migration. Types come from generated shapes (parsing CREATE TABLE) and an async MySQL client that returns typed rows, plus inferred return types; a CI enforces HHVM checks, a coverage leaderboard drives adoption, strict mode reaches about 75% of files, vendor PHP gets removed, and the process enables safer refactors and fewer runtime surprises.

AI-written summary · about

  1. 0:00Intro
  2. 2:11Overview
  3. 3:20Static Type Checking
  4. 6:02Inferred Generics
  5. 6:25Inferred Union Types
  6. 7:04Two kinds of Arrays
  7. 7:17Arrays with Generics
  8. 9:00Hack Arrays
  9. 9:25Arrays with mixed types
  10. 11:47Using Optional Fields
  11. 12:03Type Refinement
  12. 13:06PHP Standard Library
  13. 13:24Composing PHP functions
  14. 14:08Hack Standard Library
  15. 14:25Hack Pipeline with HSL
  16. 15:18Type Checked Regex
  17. 16:16XHP: Type safe HTML
  18. 18:06Fix with automation
  19. 19:53Move code into functions
  20. 21:54DB Types: Before
  21. 23:11Inferred Return Types
  22. 24:05Untyped code
  23. 26:54Eliminate PHP Dependencies
  24. 27:06HHVM 4.0 Upgrade
  25. 28:18Lessons Learned
~/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.