SyliusCon 2025
Early Bird Deal
LogoLogo
🛣️ Roadmap💻 Sylius Demo💬 Community Slack
  • Sylius Documentation
  • Sylius Plugins
  • Sylius Stack
  • 📖Sylius 2.0 Documentation
    • Organization
      • Release Cycle
      • Backwards Compatibility Promise
      • Sylius Team
      • Sylius Roadmap
  • Getting Started with Sylius
    • Installation
    • Basic Configuration
    • Shipping & Payment
    • First Product
    • Customizing the Shop
    • Customizing Business Logic
    • Using API
    • Installing Plugins
    • Deployment
    • Summary
  • The Book
    • Introduction to Sylius
    • Installation
      • System Requirements
      • Sylius CE Installation
        • Sylius CE Installation with Docker
      • ➕Sylius Plus Installation
      • Upgrading Sylius CE
      • Upgrading Sylius Plus
    • Architecture
      • Architecture Overview
      • Architectural Drivers
      • Resource Layer
      • State Machine
      • Translations
      • E-Mails
      • Contact
      • Fixtures
      • Events
    • Configuration
      • Channels
      • Locales
      • Currencies
    • Customers
      • Customer & ShopUser
      • ➕Customer Pools
      • AdminUser
      • Addresses
        • Countries
        • Zones
        • Addresses
        • Address Book
    • Products
      • Products
      • Product Reviews
      • Product Associations
      • Attributes
      • Pricing
      • Catalog Promotions
      • Taxons
      • Inventory
      • ➕Multi-Source Inventory
      • Search
    • Carts & Orders
      • Orders
      • Cart flow
      • Taxation
      • Adjustments
      • Cart Promotions
      • Coupons
      • Payments
      • 🧩Invoices
      • Shipments
    • Support
    • Contributing
      • Contributing Code
        • Submitting a Patch
        • ⚠️Security Issues
        • Coding Standards
        • Conventions
        • Sylius License and Trademark
      • Contributing Translations
      • Key Contributors
  • The Customization Guide
    • Customizing Models
      • How to add a custom model?
      • How to add a custom translatable model?
    • Customizing Forms
      • How to add a live form for a custom model?
    • Customizing Styles
    • Customizing Validation
    • Customizing Menus
    • Customizing Templates
    • Customizing Translations
    • Customizing Flashes
    • Customizing State Machines
    • Customizing Grids
    • Customizing Fixtures
    • Customizing API
    • Customizing Serialization of API
    • Customizing Payments
      • How to integrate a Payment Gateway as a Plugin?
  • 🧑‍🍳The Cookbook
  • How to resize images?
  • How to add one image to an entity?
  • How to add multiple images to an entity?
  • Sylius 1.X Documentation
    • 📓Sylius 1.x Documentation
Powered by GitBook
LogoLogo

Developer

  • Community
  • Online Course

About

  • Team

© 2025 Sylius. All Rights Reserved

On this page
  • Technical constraints
  • Functional requirements
  • Quality attributes
  • Sources and inspirations

Was this helpful?

Edit on GitHub
  1. The Book
  2. Architecture

Architectural Drivers

PreviousArchitecture OverviewNextResource Layer

Last updated 8 months ago

Was this helpful?

Architectural Drivers are the key factors that influence all the decisions we make during application development. Historically, a lot of them were taken unconsciously, but, happily, resulted in good decisions that we can undoubtedly justify today. All of them have a significant influence on the Sylius as an application - they can and should be used to guide us during the development, to make the best decision for the product.

Technical constraints

Programming language

PHP

Due to the decision to base Sylius on the Symfony framework (see below), PHP was the only possible option as a programming language. Nevertheless, a good decision! This language has been dynamically developing for the last few years and still powers up most of the websites and applications on the World Wide Web.

Currently supported PHP versions can be seen in

Main frameworks and libraries

Fullstack Symfony

Sylius is based on Symfony, a leading PHP framework for creating web applications. Using Symfony allows developers to work better and faster by providing them with the certainty of developing an application that is fully compatible with the business rules, structured, maintainable, and upgradable. It also allows developers to save time by providing generic reusable modules.

.

Doctrine

Sylius, by default, uses the Doctrine ORM to manage all entities. Doctrine is a family of PHP libraries focused on providing a data persistence layer. The most important are the object-relational mapper (ORM) and the database abstraction layer (DBAL). One of Doctrine’s key features is the possibility to write database queries in Doctrine Query Language (DQL) - an object-oriented dialect of SQL.

For a deeper understanding of how Doctrine works, please refer to the .

Twig

Twig is a modern template engine for PHP that is fast, secure, and flexible. Twig is being used by Symfony.

To read more about Twig, .

API Platform

API Platform is a modern solution for developing high-quality APIs. API Platform works by default with Symfony and depends on its components.

Third-Party Libraries

Sylius uses a lot of libraries for various tasks:

Functional requirements

Quality attributes

Extendability

Sylius offers a lot of standard e-commerce features, that could and should be used as a base to introduce more advanced and business-specific functionalities.

Question to be asked: is it possible to easily add new, more advanced functionality to the module/class/service I implement? Examples:

Customizability

Seemingly similar to the previous one, but essentially different. Focuses on making it possible to override the standard functionality with a different one, while still keeping the whole process working. The most important (but not the only) step to reach it is using interfaces with small, focused, and granular services. Customizability should be kept on all levels - from the single service to the whole module/component.

Question to be asked: is it possible to replace this functionality and not break the whole process? Examples:

Testability

As mentioned before, Sylius embraces test-driven methodologies from its very beginning. Therefore, every class (with some exceptions) should be described with unit tests, every functionality should be designed through Behat acceptance scenarios. Highly tested code is crucial to ensure another, also important driver, which is the reliability of the software.

Question to be asked: is my module/class easy to be tested, to protect it from potential regression?

As history has shown, if something is difficult to test, there is a huge chance it’s not designed or written properly.

Sources and inspirations

This chapter was created and inspired by the following sources:

for payments

- for shop and admin menus

- for filesystem abstraction (store images locally, Amazon S3 or external server)

- for image processing, generating thumbnails, and cropping

- for pagination

All of the functionality provided by default with Sylius is described as user stories using Behat scenarios. Take a look to browse them.

Sylius has focused a lot on software quality since its very beginning. We use test-driven methodologies like to ensure the reliability of the provided functionalities. Moreover, as Sylius is not the end-project (it is rarely used in a vanilla version), but serves as the base for the actual applications, it’s crucial to take care about its ability to fulfill such a role.

promotions and registered with tags

state machine

resource

service for that can be overridden to provide more advanced pricing strategies

, which gives possibility to configure any service as a resource-specific controller/factory/repository etc.

by Erik Franzen

by Kamil Grzybek

🇵🇱 - a polish online course for software architects and engineers

this chapter.
Learn more about Symfony
excellent documentation on their official website
go here
Payum
KnpMenu
Flysystem
Imagine
Pagerfanta
here
TDD and BDD
actions
rules
callbacks
events
calculating the variant prices
resource configuration
Architectural Drivers in Modern Software Architecture
Modular Monolith: Architectural Drivers
Droga Nowoczesnego Architekta