Symfony vs Laravel: Why Symfony is better than Laravel

May 10th, 2017

Web / Symfony / Outsourcing // Grossum Possum

Which framework is better Symfony vs Laravel

Which framework to use for your next project?

Short answer: there’s no short answer. (Sorry.)

Different projects have different requirements and there’s no silver bullet that would solve all the problems right away. However, to make the journey of navigating through the jungles of frameworks and programming languages a bit easier, we have collected opinions from various developers and project managers regarding Symfony vs Laravel frameworks, including their advantages, disadvantages, and things to remember.

Here at Grossum, we rely on Symfony PHP framework because we feel it's better, but check out the pros and cons of both PHP frameworks in our comparison.

Laravel vs Symfony PHP Frameworks Comparison

SYMFONY (of your success)

Symfony framework is based on PHP language and can be compared to a car with a manual transmission. There are some die-hard fanatics who claim they would never trade manual for automatic transmission, even if they don’t drift as much as they would’ve liked to, but still.

The Symfony journey began in 2011 when the first release saw the world. At the moment, the long-term support version is 2.8. The latest version with all the new features that Symfony community recommend to use for projects is 3.2.4.

Why is Symfony good?

When your project is small and you don’t plan to expand it much, Laravel (or other frameworks) might be a better choice than Symfony.

However, if you’re looking for an easily scalable product, Symfony will save you in the long run.

It focuses on building well-designed and structured projects to make sure the latest best practices are used to make long-term support of complex applications more efficient.

Bundle system is also quite a convenient way to develop projects because they are reusable and if you know you might need this type of feature in other projects - create a bundle and forget about major headaches and millions of repeated lines of code.

Symfony PHP framework is becoming an industry standard. Laravel itself uses quite a lot of Symfony2 components as well as Drupal 8 that uses Symfony core. Therefore, if you are a developer, once you know Symfony, you can easily adapt your knowledge to many other languages without much trouble. However, the learning curve for Symfony is higher than for Laravel or CI.

Consider using Symfony for your project if you’re looking for:

  • Framework rich with features and the largest amount of bundles out of all available frameworks
  • Stability of enterprise level
  • Major (LTS) releases and minor edits to versions in between
  • Clear roadmap for Symfony versions maintenance and streamlined documentation with examples
  • Flexibility to choose what to implement
  • Official certifications and training opportunities available
  • There are many OSS projects that depend on Symfony components, therefore Symfony knowledge can come in handy if you face Joomla, Magento, Silex, Doctrine, Laravel, Drupal, EZPublish, and others.
  • Symfony configuration files use .yml files that are much concise in the syntax for defining anything from extensions to routes as opposed to ZF2 and Laravel’s PHP files that can become quite large and complicated as the project grows.
  • Doctrine ORM allows you to work with entities, in the same way, no matter whether you’re using MongoDB or SQL or any other database.
  • Symfony Forms are convenient to use for small apps and great for complex apps as well. At the recent #SymfonyCafeKyiv, we have talked about Symfony forms and their advantages.

While we like Symfony, to be fair, let's compare these PHP frameworks.

LARAVEL PHP FRAMEWORK

A little trivia. If you have been wondering where the name Laravel came from, here’s what Taylor Otwell, the creator of the Laravel framework, says:

In Narnia, Cair Paravel is the name of the castle where the kings and queens of Narnia live. Laravel rhymes with Paravel. I thought the name had a classy and sophisticated ring to it.

Laravel is one of the PHP frameworks built using numerous Symfony components. The idea was to make a framework that is leaner and faster to learn and that can cover the majority of project requirements.

What’s useful about Laravel, the rising star of the PHP community?

  • Offers simple unit testing
  • Uses Composer to manage dependencies
  • Comes with its own ORM called Eloquent (Symfony uses Doctrine) and templating engine called Blade (Symfony relies on Twig)
  • Provides Laracasts training materials

Numerous developers prefer Laravel because of the conventions, syntax, workflow and other perks of this framework. There are also great high-quality educational resources provided by large supporting community, for example, how to create a social network from scratch.

Some developers say that Laravel is a convenient brother of Symfony, like an automatic transmission car to Symfony’s manual. That said, it still promotes a certain type of opinion and comes with its own set of beliefs.

If you are looking for a quick and easy MVC (model-view-controller), Laravel might be a good way to go.

So, Symfony vs Laravel?

Like we mentioned above, there’s no silver bullet. The main question that you need to ask before settling down with a framework - what are the technical requirements and what are the plans for the project’s future.

Are you looking for a quick and simple web application? Laravel would be an easier way to go.

Are you looking for a complex and scalable web product or backend for mobile apps? Symfony might be a better path to take here, considering the flexibility and abundance of bundles one can use to set up virtually any kind of interaction within the app.

Looking for Symfony developers? We’ve got them!

Author: Grossum Possum

Grossum Possum. He loves using Symfony2 for his projects and learning to implement Symfony3. He also likes developing web and mobile applications using other programming languages and frameworks, such as PHP and Java. In his free time, Grossum Possum likes to write about his experiences in the blog.

Tags Laravel Backend Development Hacks Symfony Cafe Frontend

See all blog

x

Grossum Startup Guide:
Five Things to Consider Before Web & Mobile Development

Get the Guide