background

October 22, 2023

Laravel as baseline for Magento or Shopware developers?

Yireo Blog Post

I have mentioned this myself in the past: To become a good Magento or Shopware developer, you need to have sufficient knowledge of OOP in PHP. Having background knowledge of Laravel or Symfony helps. But does it?

How to onboard new PHP developers that know their stuff?

Hiring senior Magento or Shopware developers is hard. There is a huge shortage and because of that, plenty of agencies are fishing a pond too small. Loosening up the requirements makes sense: Hire PHP developers. Unfortunately, PHP developers come in all sorts and sizes. Some have plenty of knowledge on design patterns, some don't know what composer is.

The problem (?) is that PHP is popular. There are CMS-es like WordPress, Joomla, Typo3 and Drupal. There are frameworks like Laravel, Symfony and CakePHP. And there are e-commerce applications like Magento, Shopware, PrestaShop and Sylius. And much much more. And not everyone who is capable modifying the storefront of such an application is to be qualified as a good PHP developer. Search for tips on StackExchange and you'll see plenty of wrong advices around, showing that quality knowledge is not common good.

Educating newcomers (so, developers yet without PHP knowledge) is a strategy I've seen couple of times now - me also being the trainer in some of those cases. But in almost all cases, this is either a failure or a project that simply takes years and years: Perhaps it is possible to teach a newcomer plain PHP and even play with Laravel in a few months. But handling e-commerce, specifically with Magento and Shopware, requires more insight.

The baseline of Laravel and Symfony

Adding a baseline - requiring knowledge of Laravel and/or Symfony as a minimum - has been a strategy that I've been promoting for years: With both frameworks, you learn to play with various PHP OOP patterns, you learn how to build CLI classes, you play around with dependency injection, and so on.

This sounds great. And it might turn out ok for some candidates. But there are downsides. For instance, if somebody played around with Laravel for a year, it doesn't make that person a senior PHP developer. And if that person is educated for Magento development, there is a great vastness of things that still need to be taught: The practice of e-commerce, dealing with business critical systems, a more serious stack (OpenSearch, Varnish, RabbitMQ), complex code patterns (like insane XML layout abstractions).

Laravel vs Symfony

There is a difference between Laravel and Symfony as well. Some Symfony stuff finds it way into the Magento code, but Shopware is entirely based on Symfony. Hence, if a developer has a solid understanding of Symfony, learning Shopware becomes much much easier. And due the complexity of Symfony (with service declarations, PHP attributes and compilation and all), the complexity of Magento also gets a little less.

But with Laravel, you don't benefit as much as you would with Symfony. First of all, because Laravel code is not often (understatement) used outside of Laravel, you don't benefit from the code itself when learning Magento and Shopware. Additionally, concepts like service configurations and compilation are not there in Laravel. So with Laravel, you have knowledge to start of, when diving into Magento and Shopware.

It doesn't make Laravel bad as a requirement. It simply points out that the baseline of Symfony and the baseline of Laravel is not the same baseline.

The case of Laravel being harmful

Some say that Laravel is also - from a more architectural point of view - of lesser quality than Symfony. On Reddit, there is a great article by "sowekoko" that points out many things that could be considered harmful: reddit.com/r/PHP/comments/131t2k1/laravel_considered_harmful/ - make sure to read all of that.

To my opinion, Laravel is a great way of learning how to code with PHP. And also, to build a simple application from scratch, it is great: I am still using a mailer application and a CRM that I've built in Laravel for my own purpose. However, once you need an application that requires a huge extensibility (modules, configuration, flexibility) and solid coding API, then Laravel does not fit that description easily.

The point?

Laravel serves its purpose. But saying that Laravel knowledge is a good minimum requirement to onboard new Magento or Shopware developers, might set an expectation that the learning curve is short. However, when we say a WordPress developer is hired to become a Magento developer, a lot of people start to laugh. To my opinion, that's strange. WordPress could be deployed via composer and shipped with testing. Equally, a Laravel site could be in a consistently broken state filled with core hack. The framework itself does not guarantee that the person (building the application on top of that framework) is knowledgable.

The solution: Proper interviewing. Find out how much a developer understands of Laravel. Check whether the developer is suffering from Laravel tunnel vision. And if the knowledge lacks, no problem, just calculate more time for the onboarding process (obviously with the education managed by Yireo).

Posted on October 22, 2023

About the author

Author Jisse Reitsma

Jisse Reitsma is the founder of Yireo, extension developer, developer trainer and 3x Magento Master. His passion is for technology and open source. And he loves talking as well.

Sponsor Yireo

Looking for a training in-house?

Let's get to it!

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.

Do not miss out on what we say

This will be the most interesting spam you have ever read

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.