The love story between Symfony and HTTP

Foundation, Kernel & Client is the perfect trio to deal with the famous protocol

Alexandre Daubois
6 min readDec 14, 2021

So I’ve been talking a lot about different components Symfony offers. In case you’re not familiar with the component term in the Symfony ecosystem, you just have to know that components are standalone libraries you can install in your project, without having your project to be entirely written with Symfony. You can simply add one Symfony component in your project if a feature interests you. The Symfony framework uses all of these different components to give you a pleasant developer experience.

Among those dozens of components, 3 are an absolute focus on HTTP. Given their name (HttpFoundation, HttpKernel and HttpClient), it may be confusing if you’re new to the Symfony ecosystem. Each of them solves specific needs. Because we could wonder: why don’t the Symfony core team put all HTTP stuff in one and only one “Http” component? Let’s see how using this trio could definitely change the way you deal with HTTP in your applications and projects.

Foundation, Kernel and Client

1. The HttpFoundation component defines an object-oriented layer to manipulate what makes the foundations of HTTP (which isn’t a big surprise). But what do I mean when talking about…

--

--