4 min. read
Categories: Technical
A comprehensive update of everything juicy in the recent minor 1.13 release! 💦

Abstract

  • 1.12 released in Q4 2022
  • 1.13 on Apr 23rd, 2024 (a year later than we anticipated while releasing 1.12)
  • 3859 commits
  • 23 contributors

A stabilized Sylius API powered by API Platform

It’s been a long and bumpy road. Having it behind our backs was a highway that led Sylius to a new universe. Many have awaited the stability of the new Sylius API. With 1.13, it is no longer experimental. It has all the features you know from UI covered, and it can be safely used to create robust headless web applications for eCommerce.

What are the benefits?

  • Sylius API is based on API Platform, which is a modern framework for API that replaces FOSRestBundle. This allows for more advanced features and better performance;
  • The new API unifies the previously separate APIs for the shop (SyliusShopAPI Plugin) and for admin (SyliusAdminApiBundle), so now there is just one API, and thus
  • All the new features will be delivered in the new API, with the API-first approach;
  • Customization got easier – with the legacy API, customization required overwriting many files (command, event, command handler, event listener, etc). The new API simplifies this process;
  • While security issues will be fixed in the legacy APIs, the new API is built with modern security practices in mind.

These benefits make the new API a powerful tool for developers working with Sylius. It provides a more streamlined, efficient, and secure way to build and customize eCommerce applications.

Browse the new API here.

Price History Feature compatible with Omnibus Directive

Alongside the introduction of certain EU price transparency regulations, in 1.13, we have incorporated into the core the feature for showing the lowest price of products from the last 30 days before the current discount was applied. This feature was previously a plugin released over a year ago.

We have also enhanced the visibility of product modifications in the administration panel. In Sylius 1.13, you can track changes in the channel pricing of each Product Variant:

Symfony Workflow support as an alternative to Winzou State Machine

The Symfony Workflow is a component that provides tools for managing state machines. It’s an object-oriented way to define a process or lifecycle that your objects go through. Each step or stage in the process is called a “place,” and you also define “transitions,” which describe the action needed to get from one place to another.

Here are the benefits of using Symfony Workflow in Sylius 1.13 over the previously used Winzou’s StateMachineBundle:

  • Better Integration with Symfony: Since Sylius is built on top of Symfony, using Symfony Workflow allows for better integration and consistency within the framework;
  • Flexibility: Symfony Workflow is renowned for its flexibility and comprehensive features that cater to developers’ needs across the spectrum;
  • Ease of Use: The Workflow component provides an object-oriented way to define a process or lifecycle for your objects. This makes it easier to understand and work with.

Enhance developer experience with PHP8+ Attributes and Interfaces

We’re excited to announce that Sylius 1.13 now leverages PHP8 Attributes and Interfaces, a significant development advancement. This allows for the autoconfiguration of services in Sylius, improving the development process performance.

PHP8 Attributes add metadata to classes, methods, and variables, enhancing code expressiveness. In Sylius 1.13, these attributes are used to define and manage services, simplifying service declarations. You can also use these attributes in your projects.

How does it work in a real example?
<<link>>

namespace Sylius\Bundle\ChannelBundle\Tests\Stub;

use Sylius\Bundle\ChannelBundle\Attribute\AsChannelContext;
use Sylius\Component\Channel\Context\ChannelContextInterface;
use Sylius\Component\Channel\Model\Channel;
use Sylius\Component\Channel\Model\ChannelInterface;

#[AsChannelContext(priority: 15)]
final class ChannelContextStub implements ChannelContextInterface
{
    public function getChannel(): ChannelInterface
    {
        return new Channel();
    }
}

Check out more details in this PR!

PHP8 Interfaces ensure consistency across the application by defining required methods for a class. This speeds up development, for example, a custom service implementing ChannelContextInterface now shouldn’t need to be declared in `services.yaml` thanks to autoconfiguration.

These enhancements significantly improve the Developer Experience (DX). They make the codebase more navigable, easier to understand, and simpler to extend.

Huge thanks to Félix Fouillet who started this initiative at Sylius and Jakub Tobiasz for bringing it to an end responsibly!

What’s next?

1.13 is our victory lap, but it’s also the warm-up for the show-stopper… Sylius 2.0. Big shoutout to everyone for the feedback and high-fives along the way.

Handy release: 1.14

Sylius 1.14 release, the last 1.x ever, is around the corner. We are preparing a very useful interconnection between 1.x and 2.0 so that the leap into 2.0 will become much smoother. 1.14 will be a release without features, introducing deprecations, so you will have a chance to prepare beforehand. With deprecations, we can let you know what will be removed in 2.0 and how these things have been substituted.
Smooth updates are our thing; we also have that in mind between majors!

SyliusCon

Get ready for the largest Sylius conference ever! SyliusCon 2024 will take place in Lyon, France, on November 13th. This event will bring together over 350 participants from around the globe, creating a vibrant space for business owners, developers, and open-source enthusiasts alike.

SyliusCon is the perfect place to deepen your knowledge about Sylius and connect with like-minded individuals. Whether you’re looking to network, learn, or share your expertise, this is the event for you.

Don’t miss your chance to contribute to this incredible event. 👉 sylius.com/conference/

Sylius Cloud by Platform.sh (Silent announcement) 🤫

We’re thrilled to announce a strategic partnership with Platform.sh, resulting in the launch of Sylius Cloud powered by Platform.sh!

Sylius Cloud simplifies infrastructure management, offers seamless scaling, and provides robust security features for all Sylius users – from developers to large enterprises. With Platform.sh, enjoy 24/7 support, automated infrastructure, and robust security. 🚀

Why We Chose Platform.sh:

As a tech company, we know building and managing infrastructure is challenging. We needed a reliable PaaS solution that our community could trust. Platform.sh, already a market standard in open-source projects like Symfony, offers the perfect blend of flexibility, security, and automation to enhance the Sylius experience.

What about Sylius Plus modules and official plugins?

All official Sylius plugins, including Sylius Plus modules, have been updated to version 1.13. This update, beyond the compatibility, features a number of little improvements. To learn more about the updated plugins and the enhancements they bring, you can visit the official Sylius website at sylius.com/plus (for Plus modules updates) and our official GitHub repository at https://github.com/Sylius (for plugins).

Share:
Magdalena Sadowska
Magda is making decisions about Sylius features and breaking those into implementable tasks since 2017 in Product Owner role. Present on both our Github and Slack to chat about Sylius business-wise. Privately: she’s raising two tiny humans.
More from our blog
Technical 4 min read 04.12.2024
Here’s everything you had to know about the first major release since 2017! Over 7 years after the first major release, on Nov 12, 2024, we have released Sylius 2.0.0. We had a great opportunity to announce it first at SyliusCon in Lyon, but now, as we are back to… Read More
4 min read 22.11.2024
The emotions start to settle after SyliusCon, and it’s time to reflect on this incredible milestone in our journey. Why a milestone? Because SyliusCon exceeded our expectations in every possible way. We broke attendance records and brought together the key figures of our community, numerous partners, freelancers, and simply all… Read More
Cloud 4 min read 17.06.2024
We are thrilled to announce that we just signed a strategic partnership with Platform.sh, and as a result, we are extending our offer with Sylius Cloud powered by Platform.sh. Platform.sh is a modern Platform-as-a-Service (PaaS) solution that allows businesses to leverage the cloud environment without losing access to the code… Read More
Comments