3.9 KiB
UPGRADE FROM 2.2.6 TO 2.2.7
Constructor Signature Changes
- The constructor of
Sylius\Bundle\ApiBundle\ApiPlatform\Routing\IriConverterhas been extended with an optionalApiPlatform\Metadata\ResourceClassResolverInterfaceargument.
public function __construct(
IriConverterInterface $decoratedIriConverter,
PathPrefixProviderInterface $pathPrefixProvider,
OperationResolverInterface $operationResolver,
RouterInterface $router,
+ ?ResourceClassResolverInterface $resourceClassResolver = null,
)
Bahavior changes
- The
LiveComponentTagPassandTwigComponentTagPassinSyliusUiBundlewere registered with a priority of500, which caused them to run before Symfony's autoconfiguration passes (priority100). As a result, services tagged via#[AutoconfigureTag]orregisterForAutoconfiguration()with thesylius.twig_componentorsylius.live_component.*tag did not receive thetwig.componenttag. The priority has been lowered to50to ensure Symfony's autoconfiguration runs first.
UPGRADE FROM 2.1 TO 2.2
Telemetry
Sylius 2.2.0 introduces anonymous telemetry to help us understand how Sylius is used and improve the platform.
What data is collected:
- Anonymous installation ID (hashed, non-reversible)
- Sylius and PHP versions, default locale
- Aggregated statistics as segments (broad ranges, not exact values):
- Customers/products/variants count (e.g., "1K-10K", "100K-1M")
- GMV and AOV ranges per month (e.g., "100K-500K", "50-100")
No sensitive data is ever collected - no customer information, no order details, no personal data.
Configuration:
Telemetry is enabled by default and uses a default salt for hashing the installation ID.
To disable telemetry, set the following environment variable in your .env file:
SYLIUS_TELEMETRY_ENABLED=0
To change the salt, set the SYLIUS_TELEMETRY_SALT environment variable:
SYLIUS_TELEMETRY_SALT=your-custom-salt
Deprecations
-
Not injecting a
tagged_iteratorwith the tagsylius_shop.modifier.address_form_valuesinto the constructor ofSylius\Bundle\ShopBundle\Twig\Component\Checkout\Address\FormComponentis deprecated since Sylius 2.2 and will be required in Sylius 3.0.This change enables extending the checkout address form with custom fields or logic by registering services tagged with
sylius_shop.modifier.address_form_values, which implement theAddressFormValuesModifierInterface.
public function __construct(
OrderRepositoryInterface $repository,
FormFactoryInterface $formFactory,
string $resourceClass,
string $formClass,
protected readonly CustomerContextInterface $customerContext,
protected readonly UserRepositoryInterface $shopUserRepository,
protected readonly AddressRepositoryInterface $addressRepository,
+ protected readonly ?iterable $addressFormValuesModifiers = null,
)
-
Direct usage of
loader.svgandloader.gifassets is deprecated. Use@SyliusAdmin/shared/helper/loader.html.twigor@SyliusShop/shared/macro/loader.html.twiginstead. -
The
Sylius\Bundle\ReviewBundle\Updater\ReviewableRatingUpdaterInterface::updateFromReview()method has been deprecated and will be removed in Sylius 3.0. Use state machine mechanism implemented by Symfony Workflow instead.
Admin UI
- A new
modal-portal.jsscript has been added toAdminBundle. It moves Bootstrap modal elements to<body>before they are displayed, preventing them from being rendered behind the Bootstrap backdrop when nested inside a CSS stacking context (e.g. the sticky.page-header).
Translations
- The
TranslationLocaleProvidernow ensures that the default locale (configured aslocaleinconfig/parameters.yaml) is always placed at the beginning of the returned locales array.
Other locales remain in the same order as returned by the repository.