Sylius is an open-source ecommerce framework Symfony, available in two versions: Community Edition and a commercial license – Sylius Plus. Both give the ability to scale and expand immensely.

Sylius is an API-first, headless, PWA-ready open-source platform ready to be used in numerous cases for merchants who value their business digitalization. Sylius is the opposite of the monolithic approach, and its high-end performance has attracted many of the largest players in the eCommerce market. Its flexibility, great architecture and philosophy make it flexible enough to call it not only a platform but also a framework for the most demanding eCommerce projects.

This article is directed at software developers keen to learn how to become outstanding Sylius developer at some point. It might be handy to those who want to learn good practices while working with Symfony projects and freelancers who want to learn the basics of working with Sylius.  

A quick note for a potential Sylius developer

First, it is good to have some experience with Symfony beforehand; PHP (and so-called LAMP or similar stack) knowledge is a must though. There are plenty of tutorials on how to learn both, so in this article, we are going to skip them and assume that everyone reading it is either now or will soon become fluent with the mentioned technologies. We recommend checking out SymfonyCasts, full of videos about PHP, design patterns applied in the language, and finally, the Symfony framework itself. You can learn all those things from docs and StackOverflow too, but considering that SymfonyCast has a great orchestration of materials in an easy-to-understand step-by-step way, it is worth every penny and it is not expensive too.

  • First, a new Sylius developer needs to take some time to understand the architecture and what Sylius is built upon – e.g., ResourceBundle, GridBundle and CoreBundle are essential to operate through it smoothly and learn in a smart way.
  • Secondly, Sylius documentation provides a ton of useful information and practical examples of not only what is included in the package but also how to use it easily. It has thoroughly described processes regarding the installation and customization of the system that are worth looking into. Nonetheless, to understand it fully, it is best to look into the code. Make sure you read the recent version of the docs though. Reading the documentation and understanding the mechanics behind Sylius should not take you more than a couple of hours or days top (depending on how quick you learn).
  • Once you master the docs and get the feeling that you are ready to get your hands dirty, it’s time to install it in your local environment. Sure you will need to refer back to the doc quite often in the beginning, but now you know what information you can find there and where to look for the answers. No matter how great the docs are, there will always be some answers you won’t find in there. There are two ways to solve that. One is to debug how the code executes and read through the vendor’s code. It is super easy to understand, and if you use Xdebug with your IDE (which you should do, believe us!), it gets even easier. The second is to join the official Sylius community Slack and ask live one of almost 6k members who might have struggled with similar problems in the past. The Sylius community is full of awesome people. Our experience is you will get an answer in no time. We are there too! We will touch a bit more on the community later in this article.

Standardization in Sylius projects

When it comes to standardization, it will be much easier to navigate through the project if you follow Sylius coding standards. Since this platform is based on Symfony, it follows its standards and also adds its own standards and tools, for instance, static code analysis via PHPStan

Standardization aims to facilitate management and project takeover and improve the process of implementation. Moreover, it helps to avoid any misunderstandings between developers, as there are certain rules in coding that they have to follow. This is quite significant if you are willing to be a valuable team player and think about the project long-term. This mindset is certainly a strong advantage for any good developer.

Pay attention to these elements in Sylius

The state machine is a widely used concept in Sylius. Many processes are designed using this approach, like the checkout process and management of an order’s shipments or payments. To achieve it, Sylius uses WinzouStateMachineBundle, which is an integration layer between the state machine library and Symfony, both from the same vendor. This could be a bit tricky at first but you will appreciate it once you understand it properly and learn what processes Sylius uses it for. Take our word for it – it is a powerful weapon.

GridBundle

Many web apps commonly display a grid with sorting and filtering options. This bundle makes it simple to display grids by integrating the Sylius Grid component with the Symfony framework. For instance, automatic sorting. An integral part of it is understanding ResourceBundle, which is a standardization of CRUD operations upon which many parts of Sylius are built.

Database structure

To keep it simple, it is important to know where you can find what interests you in Sylius. It is worth checking Sylius’ documentation to know how to extend data structure to add new fields and relations to the database and particular parts of the data architecture e.g., creating and customing repositories for a proper access layer.

API platform

It is a REST and GraphQL framework designed to build modern API-driven projects, which are, in fact, a standard in the Symfony world nowadays. API Platform covers, for example, product catalog and checkout. To fully see what API offers in Sylius, you can check out the demo.

In order to learn how to use Sylius API, it is worth going through the Cookbook. It gives a general overview of how to do a variety of operations in Sylius. It is definitely a core element in exploring the Sylius’ world.

BitBag Academy 

As a leading Sylius partner, we are not only occupied by creating Sylius’ projects but also taking care of the development of the communityBitBag Academy (PL) is an initiative by developers. We welcome people to BitBag Academy and give them access to what we consider the best way to learn Sylius and work with it in the future. We even offer job propositions to some who finish the academy after acquiring the necessary knowledge. We are more than happy to invite those people to the BitBag team. Oh, almost forgot to mention – and it is free.

Entering Sylius Community

The first place definitely worth looking into is the Slack channel dedicated to Sylius developers. Apart from Sylius’ documentation, it is a perfect place to chat with the community, whether you seek help with some issue or you are the one that wants to help others. A similar place also worth mentioning is the official Sylius forum. Moreover, you can visit FriendsofSylius on Github, where open-source plugins, bundles, tutorials, and more are available for everyone, and Packagist, which has a Sylius package repository. There are also a lot of Sylius plugins you can find on our GitHub and even more useful content on our blog.

Last but not least, it is certainly worth to involve in helping others once you have some knowledge about Sylius and Symfony framework because teaching is also a very good way to learn and develop.

Summary

Sylius is a platform that offers numerous possibilities while maintaining excellent performance and great code quality. Knowing a PHP Symfony well can be a huge step forward in a software developer’s career and opens a path for a Sylius developer. What’s more, our BitBag Academy is open for developers ready to learn new skills and the Sylius community is always ready to help and support newcomers. Sylius community is a team, therefore, do not hesitate to share your knowledge with others too by sharing this article!