February 23-25, 2022
Montreal, Canada

Build a RESTful API with Symfony & API Platform

API Platform has become the de facto standard for building RESTful API in the Symfony ecosystem. It's a powerful set of components that enable building REST APIs in a Symfony application. In this workshop, you'll learn how to get started with API Platform to build your first JSON REST API from the basics to the most advanced use cases.

API Platform has become the de facto standard for building RESTful API in the Symfony ecosystem. It's a powerful set of components that enable building REST APIs in a Symfony application. In this workshop, you'll learn how to get started with API Platform to build your first JSON REST API from the basics to the most advanced use cases. Over two days, the workshop will cover the following topics:

Day 1: Bootstrapping a RESTful API
  • Quick tour of RESTful concepts (HTTP, IRI, HATEOAS, content negotiation, etc.)
  • Installing & bootstrapping API Platform in a Symfony project
  • Consuming the API thanks to the API Platform UI testing tool
  • Documenting the API with Swagger, JSON Schema, JSON-LD & Hydra formats
  • Automating CRUD JSON REST endpoints for a Doctrine model resource
  • Understanding the configuration overriding system
  • Configuring the list of enabled endpoints & exposed attributes
  • Enabling or disabling pagination in collection endpoints
  • Filtering collection endpoints with built-in filters
  • Validating API resource payloads with Symfony Validator component
  • Testing API endpoints with unit & functional tests
Day 2: Extending & Tailoring API Platform to your Needs
  • Extending API Platform core services thanks to Symfony service decoration
  • Implementing custom API endpoints with dedicated controllers
  • Using DTOs & data transformers for domain specific endpoints
  • Serializing & validating API resources contextually
  • Handling advanced data serialization / deserialization with custom normalizers / denormalizers
  • Executing business logic with custom data providers & data persisters
  • Creating custom API filters & API extensions to adapt SQL queries
  • Protecting API endpoints with authentication & access control
  • Generating advanced API documentation for your API
  • Handling file uploads

In case of extra time, we'll learn how to use the Symfony Messenger component within API Platform as well as connecting API Platform to Elasticsearch for better search capabilities.

Hugo Hamon

KODERO

Hugo Hamon is a PHP and Symfony certified developer. He worked nine years for SensioLabs, the creators of Symfony, as a Web developer, head of training and software architect. He joined Dayuse.com as a backend lead developer between 2018 and 2020. He's now a full time freelance PHP developer at his own company KODERO.

Read More