• News

Laravel Vs Symfony2 - Is There Really A Difference?

Symfony and Laravel have been at the top of PHP custom web development for a long time now. People who make web pages use them to speed things up and make their code lighter.

They both make web development easy and quick. They can help you make apps that meet all of your business needs and can quickly adapt to changes in the future.

Here, it is explained what the two frameworks have in common and what they don't have in common. This will help you choose which one is best for your web. Let's compare Laravel Vs Symfony2 to see which one performs better.

Laravel Vs Symfony2

This is a question that is often asked. A person will ask, "Oh, do you use Laravel?" and the answer will be "Yes." When someone asks, "Well, what about Symfony2?", You don't understand why so many people ask that question. The first time you get this question, you'll shocked because you don't understand it.

To each other, this question makes our brain try to figure out why this person wants to know that. There is a reason why this person likes Symfony2 more than Laravel: Is it because they think that they can't go together? That you have to choose between the two?

What's The Point Of Asking These Questions?

Let me explain why this is not a good question. As of today's version of the Laravel framework package, which is 4.1.28 as, there are 24 other things that it needs to work. Out of these, 12 of them are Symfony2 parts. So you could say that Laravel relies a lot on those parts.

That is actually a great way to think about the framework. Because the parts it's relying on are well written, each does a good job well, and have been tested, it works well. This means that Laravel can leave the lower level work to those parts. They handle things like HTTP requests and responses, routing, filesystem operations, and the artisan command line tool, just to name a few, but there are many more.

In this way, Laravel can focus on wrapping or extending the components and giving the developer a more elegant way to work with them. If you need to do some low-level work, you can always get the parts you need. Try it:

$requestInstance = Request::instance();

This will give you an IlluminateHttpRequest object. Look at that class and you can see that it is a Symfony class.

class Request extends \Symfony\Component\HttpFoundation\

A great example of how Laravel (the Illuminate namespace) is wrapping or adding to the functionality of one of the components is shown in this example.

Laravel Vs Symfony2 Popularity

You want to know how the popularity of a framework will affect the development of your web apps. Sure, but think about it in a different way. When a certain technology or framework is popular, you will quickly find web application developers who can work on your project with that technology.

Before you choose a PHP framework, find out how well-known that framework is so that you can always get help if you need it.

Laravel Popularity

Laravel is the most popular of all the PHP frameworks. There is no doubt about it. There is also a Google Trends graph like this one. The PHP Laravel framework is at the top. Laravel developers can get a lot of help from the most recent Laravel documentation, the Laracast discussion forum, Codebright, Treehouse, and Sitepoint.

Symfony2 Popularity

The graph shows that after the most popular Laravel framework, the Symfony framework is next to it on the list. The Symfony developers get enough help from the official documentation page to keep them going.

Symfony is used by more than 600,000 people from more than 120 countries.

Let's Stop Trying To Compare

They aren't comparable on an equal footing. Consider Laravel's Symfony2 integration as a base, and then add its sugar on top of that. This is one of the reasons why it's so outstanding.

Recent Articles

  • All About Git Pretty Stats

    All About Git Pretty Stats

    The git status command is used to show what's going on with the repository and the staging area. It lets us see the files that have been tracked and the ones that haven't. This command won't show any commit records or other information, so don't use this command.

  • How To Get Raw POST Data In Laravel

    How To Get Raw POST Data In Laravel

    Laravel's IlluminateHttpRequest class gives you an object-oriented way to interact with the current HTTP request that your application is handling. You can also get the input, cookies, and files that were sent with the request.

  • Cyclomatic And Npath Complexity Explained

    Cyclomatic And Npath Complexity Explained

    Cyclic complexity and NPath complexity are both measured for a method of a function, just like cyclic complexity. It is the number of ways a given piece of code can be run (ignoring cycles).

  • LeetCode – Essential? Optional? Big Deal Or Not?

    LeetCode – Essential? Optional? Big Deal Or Not?

    Are you a developer aiming to put Facebook or Google (or even both!) on your résumé? There are many ways to improve one’s computer skills. LeetCode offers help in that capacity and even promises to get you employed in giant tech companies.

  • The Depths Of AngularJS's Watches

    The Depths Of AngularJS's Watches

    When you want to watch for changes in AngularJS, it is fairly kind to you by default. The kindness comes from trying to optimize performance for you. This is because each watch expressions will run at least once during each $digest loop. I'll not go into when the $digest loop executes and why, and I'll also use watches in controllers in my examples which you should never do, but that's a whole other discussion.

  • Continuous Integration For Laravel With Jenkins And Git

    Continuous Integration For Laravel With Jenkins And Git

    This will be a hands on guide for setting up automated builds for Laravel using Jenkins. Pretty much that when you do a commit, Jenkins will automagically make a build and in that check code errors and syntax, run unit tests and provide visual code coverage for your code base. Along with other goodies. Jenkins is an open source continuous integration server that has gotten a lot of attention recently as the #1 open source continuous integration server. Mostly because its vast amount of plugins, which currently is 600+ as I’m writing this. We’re going to use 10 of those to automate our test environment.

  • Cyclomatic And NPath Complexity Explained

    Cyclomatic And NPath Complexity Explained

    Cyclomatic And NPath Complexity Explained