~/talk

Building first-class REST APIs with Symfony

Talkat PHP UK Conference 2019 · 2019-02-20..02-22· [php, web-platform]
slides:none on file

Concrete recipe for working REST APIs using Symfony components: use DTO parameter converter to hydrate typed inputs, centralize validation as exceptions and render JSON via an overridden exception controller, serialize output with Fractal transformers, and consider API Platform for boilerplate. Watch HTTP verbs and codes (misused GETs can delete data), avoid heavy COUNTs that made a query take 30s, and prefer constants over magic numbers. Tools and patterns reduce controller bloat and actually work.

AI-written summary · about

  1. 0:00Start
  2. 1:11WHAT IS REST?
  3. 1:58REPRESENTATIONAL STATE TRANSFER
  4. 9:59HTTP RESPONSE CODES
  5. 10:35HTTP VERBS
  6. 14:43ERRORS
  7. 23:12VALIDATION
  8. 24:28REMOVE CONTROL FROM CONTROLLERS
  9. 25:50SYMFONY SERIALIZER COMPONENT
  10. 26:24TRANFORMERS
  11. 30:42PAGINATION AND LINKS
  12. 33:15DISABLING A TOTAL CAN MAKE THINGS QUICKER
  13. 34:23PAGERFANTA
  14. 34:38FRACTAL INTEGRATION
  15. 35:22GETTING IT TO YOUR REPOSITORY
  16. 35:51SORTS AND FILTERS
  17. 36:08THERE'S AN OBJECT FOR THAT
  18. 38:58TOOLS
  19. 39:19API PLATFORM
  20. 39:39DEMO
  21. 43:35RECAP
  22. 45:30ANY QUESTIONS?
~/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.