Symfony 4 is the new Boss in PHP Framework

gdahboy on October 06, 2019

Table Of Contents *Introduction *Component *Form *Translation *Bundle *Doctrine *Annotations *Migrations *Services *Logger *Pe... [Read Full]
markdown guide

I used to hate Symfony 4 coming from Symfony 3. Nothing was preinstalled like I was used to, you had to use Flex to install things. Now that's one of my favourite parts about it. Start barebones and add what you need, and everything just plugs in and works! It's fantastic! :)


sorry to forget mention it . Flex is one of the greatest advantages of symfony 4 add to that the new architecture and project model of symfony 4 make it greater to use .


I agree. The messagebus and the workflow components are two I've found really useful as of late, and thanks to Flex only a "composer require workflow" away :D As said, I hated it at first, but it has made things both easier and leaner. Good post! Symfony is indeed the Boss :)


Well, I do agree that Symfony 4 is "the boss" of frameworks at the moment, but definitely not because of all the stuff listed.
In fact, the stuff listed in the article are the reasons why Symfony 3 became Symfony 4, by stripping down most of the features included by default in the framework in an effort to make it leaner and faster.
The advantage of Symfony 4 is that you can strip it down and make it lighter (both in disk size and loaded functionality), but even so it still performs poorly in terms of sheer speed and memory footprint (look at Ubiquity 2 or Symlex - just don't mistake it for Silex).

The world has already moved away from fullstack frameworks (even backend monoliths would be frowned upon when starting a new project). If I were to make a new API project, the stack would look more like:

  • PHPDI - dependency injection container
  • thephpleague router
  • monolog
  • thephpleague plates (for templating, significantly faster than twig - if you need server side rendering)
  • Doctrine (speaking of which, the Doctrine items you listed are Doctrine advantages, not Symfony advantages)
  • roadrunner as the PHP application platform (if you haven't tried it, you should) OR symlex (which is still a fullstack framework, but with true modularity)

The reason being that the first 3 are PSR-compatible components, whereas Symfony needs an additional translating service to normalise its requests/responses in a way that allows you to take advantage of its modularity (also, if requests/responses aren't PSR-compatible you can't use an application platform like roadrunner for true concurrency & paralellism).


The article meant to be for beginners not for seniors ... thanks for the comment it add more to our subject


RoadRunner has integrated Queries, you don't even need a framework for it anymore.


Roadrunner is just a replacement for nginx+php-fpm pair. You still have to write your own queue implementation in your application, you won't have features like failed jobs, delayed jobs, max attempts, expirations, chained jobs etc. You have to waste many hours.

It is not just a replacement and it does have most of the features you mention. It also have automatic reconnects for queue brokers which it near to impossible to achieve in php. Check this repo: github.com/spiral/jobs

It can also run queue in memory, so you don’t need any broker.


Hi @burak ,

You mean to work with RabbitMQ etc? If so Symfony Messenger can be used to work with queues.


Great article!
But I think are general advantages inherent in other frameworks such us Yii2 or Laravel (exclude Annotations, but many developers didn't think this advantage, because they confused and complicate writing tests).
Symfony loves for the discipline of writing clean code.
(Sorry english is not my native language)


this article hasn't yet cover everything . there's a lot common in PHP frameworks and we will go through disadvantages with a newer articles .


Nice work friend i like it even i hate php and his frameworks


the idea behind this article is to choose the best framework of PHP frameworks


Thanks for your review! why most frameworks don't make the workspace visualized?


I've been a happy Codeigniter user for years. Tested Laravel at the time but seemed complicated. Now I might be looking again, Symfony included. I want a cleaner template, more powerful ways to build sql queries/searches. We'll see.


i think that the right place is symfony ... well to be honest at first it may seems complex at the begging but when you use to , you will see how great to use it

code of conduct - report abuse