Avid developer who has a passion for | 

Learn more about myself and what makes me so passionate about various forms of software development.

Why I Like Symfony

Posted On 2019-09-21

I've been programming in PHP for a long time and in that time I've used many frameworks, and they all have their own quirks and things that made them special as well as annoying, but I recently have been using Symfony and have been enjoying it more and more. Before I start, let me just fire off some past frameworks that I've used:

  • Codeigniter
  • Kohana
  • Zend Framework (this one was actually not by choice)
  • Fuel PHP
  • Laravel
  • Silex
  • Slim
  • Symfony

Backward Compatibility

I'm going straight to my favorite reason for using Symfony, they promise to not break your code and make upgrading as seamless as possible. This is nice as I'm totally against frameworks that make me totally redo my app to fit a new folder structure. A major release of Symfony does have a chance of breaking things, but they work hard to not have it happen, and the pain point is usually pretty small, in cases where the framework changed greatly, like with version 3, they gave those on version 2 ample time to migrate over by supporting the version 2 codebase longer than they would normally.

I used to be a fan of Laravel but once they began reworking the plumbing of their framework (and few other annoyances), I decided to find a new framework. Symfony 4 did do some re-plumbing of their folder setup as well, but, they didn't break apps using the old format, they gave you time to port to the new structure.

Components

While this isn't completely unique to Symfony, they were one of the first to do it well. The idea is that you can use any of the dozens of components provided by Symfony without taking a large amount of Symfony along with you. I actually got my first exposure to symfony this way, I was just cherry picking components that fit what I needed.

Flex is amazing

Symfony 4 brought us Flex, which is a new micro service platform replacing the older micro service, Silex. Flex is great in the fact that you have full access to anything symfony without writing special logic like you had to for Silex, it also allows you to be as small or as big as your app demands, it's essentially the best of both worlds. The other great thing is that they made some neat composer command helpers (or recipes as they call them) that allowed you to easily add new packages to your code, and it'd setup all the wiring up so that you could plug and play.

Their version numbers make sense

My final point isn't a super strong one, but I'm going there anyway. Symfony have their version numbers follow a pattern, for example, 3.0 - 3.3 were regular versions that had a standard amount of support, whereas 3.4 is an LTS release that has a longer support window. The last version in the series (usually it's x.4) is always an LTS release which is easy to plan for, if you want to just use their LTS versions this kind of flow allows you to know when you'll need to upgrade, and the nice thing is their LTS releases usually has a couple goodies from the new major release so that you get the best of both worlds.


Those are my reasons for liking Symfony, if you're looking to play with a new framework or maybe looking at a framework to use on a new project, I'd highly recommend you giving Symfony a try.