~/talk

Testing Strategy with the Help of a Static Analyzer

Talkat Dutch PHP Conference 2018 · 2018-06-07..06-09· [testing, developer-experience]
slides:none on file

Argues that you don’t need 100% coverage because PHPStan plus modern PHP type hints and phpstan‑strict catch many pre‑runtime bugs, so tests concentrate on business rules. Recommends turning on strict types and notices, using scalar and return types, replacing loose arrays and uniony parameter designs with small value objects, and keeping wiring vs business logic separate so wiring is verified by static analysis and business logic gets fast, mock‑free unit tests. Result: fewer brittle tests and clearer, safer code.

AI-written summary · about

  1. 0:00Intro
  2. 2:01Static analyzer
  3. 3:37Type system
  4. 4:04function foo(): string
  5. 7:54Bugs found by...
  6. 13:14PHP 7.0
  7. 17:48Stringly-typed code
  8. 19:46Objects for everything
  9. 22:05Array as a collection
  10. 23:12I can process anything
  11. 24:00I do one thing well
  12. 24:49Nullable parameters
  13. 27:06Dynamic code
  14. 27:49Callables
  15. 31:35empty()
  16. 32:04phpstan/phpstan-strict-rules
  17. 33:00Refactoring tip
  18. 36:04Business logic
  19. 36:51Undetectable bugs in wiring?
  20. 37:28What is a unit test?
  21. 39:57Repository
  22. 40:54Facade
~/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.