YoVDO

Symfony 5 Deep Dive! The HttpKernel Request-Response Flow

Offered By: SymfonyCasts

Tags

Symfony Courses Routing Courses

Course Description

Overview

Want to see how Symfony really works under-the-hood? Let's do it!

In this tutorial, we'll dive deep: tracing from the first line of code that's executed in public/index.php through the core of Symfony's HttpKernel. It's a daring adventure that includes events, controller resolvers, request attributes, and giant sea monsters... probably:

  • Hooking into Symfony with an event subscriber
  • Finding where the Request is created
  • The all-powerful HttpKernel::handle() method that's used in Symfony AND Drupal!
  • See where the core events like RequestEvent, ControllerEvent and more are dispatched
  • Controller resolver, argument resolver, argument value resolvers oh my!
  • Request attributes: the secret carrier of framework info
  • What is a sub-request?
  • Manually creating and handling sub-requests

By the end of this tutorial, you'll understand how the dots connect deep under the surface of Symfony... making you capable of hooking into just about any part of Symfony. Woh.


Syllabus

  • Events, Events & Events!
  • Hooking into Symfony with an Event Subscriber
  • index.php to HttpKernel::handle()
  • RequestEvent & RouterListener
  • Routing Secrets & Request Attributes
  • The Controller Resolver
  • Who Creates the Controller & Gives it the Container?
  • How does the Controller Access the Container?
  • The Argument Resolver
  • Argument Value Resolvers
  • How Service Autowiring Works in a Controller Method
  • Calling the Controller & View Event
  • kernel.response Event & Request Format
  • Finishing the Request
  • Exception Handling
  • The Critical kernel.exception Event Listeners
  • FlattenException & Error Status Codes
  • Serializer Error Renderer: JSON/XML Errors
  • How the HTML Error Page is Rendered
  • The Magic `_controller` Attribute
  • Custom Global Controller Arguments
  • How Entity Controller Arguments Work
  • Sub Requests
  • Sub Requests & Request Data
  • Manually Making a Sub Request
  • Sub Request Attributes

Taught by

Ryan Weaver

Related Courses

Computer Networks
University of Washington via Coursera
Cloud Networking
University of Illinois at Urbana-Champaign via Coursera
Front End Frameworks
Google via Udacity
Build a Simple Dynamic Site with Node.js Course (How To)
Treehouse
VLSI Physical Design
Indian Institute of Technology, Kharagpur via Swayam