Symfony 7 and Sylius 2.0: What Changes for Developers
A practical breakdown of the Symfony 7 stack under Sylius 2.0

Sylius 2.0 is built on Symfony 7. For developers who've been running Sylius 1.x on Symfony 5 or 6, this means a significant stack modernization. Let's break down what Symfony 7 brings to the table and what it means concretely for your Sylius projects.
Symfony 7: What's Different
Symfony 7 was released in November 2023. It's the "clean" major version that removes everything deprecated in the 6.x cycle. If you've been ignoring deprecation notices, Symfony 7 is where they become fatal errors.
PHP 8.2 Minimum
Symfony 7 requires PHP 8.2+. Sylius 2.0 pushes this to PHP 8.3. If your production servers still run PHP 8.1, you'll need to upgrade your runtime first.
This is generally a good thing — PHP 8.3 brings readonly classes, typed class constants, the json_validate() function, and significant performance improvements.
All Deprecations Removed
Every method, class, and configuration option that was marked @deprecated in Symfony 6.x is gone in Symfony 7. The most impactful removals for Sylius projects include:
Security: The old
security.encodersconfiguration is removed. You must usesecurity.password_hashers.Mailer: SwiftMailer integration is completely gone.
symfony/maileris the only option.Routing: Annotation-based routing with
@Routeis removed in favor of PHP attributes#[Route].DI: Some container configuration shortcuts have been removed.
New Attributes-First Approach
Symfony 7 doubles down on PHP attributes everywhere: routing, security voters, event subscribers, DI configuration. If your Sylius project still uses YAML or annotation-based configuration for custom controllers and services, now is the time to modernize.
What This Means for Sylius 2.0
Twig Hooks Replace Template Overrides
The old pattern of overriding entire Twig templates by placing files in templates/bundles/ is replaced by Twig Hooks — a system where you register small template fragments that hook into specific extension points.
The benefit: your customizations survive Sylius core updates. The cost: every existing template override needs to be rewritten.
Symfony Workflow Replaces winzou
Sylius 1.x relied on winzou/state-machine-bundle for order, payment, and shipping workflows. Sylius 2.0 uses Symfony's native Workflow component.
Key differences for developers:
Configuration moves from
winzou_state_machinetoframework.workflowsCallbacks become event subscribers listening to
workflow.transitioneventsGuards use Symfony's expression language instead of service callbacks
The Workflow component has better tooling: the
workflow:dumpcommand generates visual diagrams
Symfony UX Replaces jQuery
The frontend migration aligns with the broader Symfony ecosystem direction. Symfony UX (Turbo + Stimulus) is the official approach to frontend interactivity in Symfony applications.
For Sylius developers, this means:
No more jQuery dependency
Interactive features use Stimulus controllers instead of inline JS
Page updates use Turbo Frames/Streams for partial page refreshes
The asset pipeline changes (Webpack Encore configuration updates)
API Platform 4
Sylius 2.0 moves to API Platform 4, which brings simplified resource configuration, better state providers and processors, improved OpenAPI documentation generation, and native JSON:API support improvements.
If you've written custom API Platform data providers or transformers, they'll need to be updated to the new provider/processor pattern.
Practical Migration Path
Here's the approach I recommend:
Phase 1: Prepare on Sylius 1.x (1–2 weeks)
Before touching Sylius 2.0, clean up your current codebase:
Upgrade to the latest Sylius 1.x release
Run PHPUnit with
SYMFONY_DEPRECATIONS_HELPER=strictFix all Symfony deprecations: encoders → password hashers, annotations → attributes, SwiftMailer → symfony/mailer
Make sure your tests pass green
Phase 2: Audit (1–2 days)
Run a comprehensive audit of your project to understand the full migration scope: count template overrides, list winzou customizations, check plugin compatibility, inventory frontend customizations.
This is where Sylius Upgrade Analyzer helps. The CLI tool automates this entire audit, scanning your codebase for all 26 migration categories and producing a report with effort estimations. It runs locally — your code doesn't leave your machine.
Phase 3: Backend Migration (1–4 weeks)
Tackle backend changes in order of dependency:
Update
composer.jsonto require Sylius 2.0Migrate state machine configuration and callbacks
Update payment gateway integrations
Fix any remaining deprecated API usages
Phase 4: Frontend Migration (1–4 weeks)
This can often run in parallel with backend work:
Replace Semantic UI classes with Bootstrap 5
Convert jQuery code to Stimulus controllers
Update asset build configuration
Test all interactive features (cart, checkout, admin)
Phase 5: Plugin Updates & QA (1–2 weeks)
Update all plugins, run full regression tests, and validate payment flows.
The Bottom Line
Symfony 7 + Sylius 2.0 is a major modernization. The resulting stack is cleaner, more maintainable, and better aligned with the PHP ecosystem's direction. The migration effort is real but manageable with proper planning.
The biggest risk isn't any single change — it's underestimating the combined scope. Audit first, plan methodically, and you'll come out the other side with a much better codebase.


