Building Restful APIs with Symfony Components
summary
Shows how five Symfony components—HTTP Foundation, Serializer, Validator, Form and Guard—combine to build REST APIs, with concrete demos: returning 201 on POST, group-based JSON views, max-depth to avoid circular refs, and a simple JWT auth flow that actually issues tokens. Mentions JMS Serializer, FOSRestBundle and Nelmio for docs, uses SQLite fixtures with Alice/Faker and PHPUnit functional tests, and gives migration patterns for incrementally replacing legacy code while the API works.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:511. INTRODUCTION
- 2:36Sane way to approach REST
- 6:05What are Symfony Components
- 7:41II. SYMFONY COMPONENTS
- 8:57Let's create a POST endpoint
- 10:00Symfony PSR-7 Bridge
- 12:15Deserializing
- 14:49Annotations
- 15:30Let's create a GET endpoint
- 16:00Creating your custom normalizers
- 17:04Simplest example
- 17:39Validating objects
- 17:58Constraints
- 19:29Let's create a PUT endpoint
- 23:39Components and bundles
- 24:05JMSSerializerBundle
- 25:14FOSRestBundle
- 26:00LexikJWTAuthenticationBundle
- 29:02IV. TESTING
- 30:38Error handling - Nested errors
- 31:08Error handling - HTML errors
- 31:42Testing, some tips
- 32:24Fixtures with Alice & Faker
- 33:17Migrations - Option 1
- 35:09Summarizing
related talks
39mBuilding RESTful APIs with Symfony Components
57mBuilding first-class REST APIs with Symfony
41mBuilding first-class REST APIs with Symfony
50mBuild RESTful APIs easily with Symfony
34mAPI Platform: From Rest & GraphQL APIs to state-of-the-art standards in seconds
53mHigh Quality APIs with API Platform
34mWhy PHP and Symfony are still in the game
33mZero to API with Lumen
