-
Starting with Sylius 1.13, the
SyliusPriceHistoryPlugin
is included. If you are currently using the plugin in your project, we recommend following the upgrade guide located here. -
The
Sylius\Bundle\CoreBundle\CatalogPromotion\Command\RemoveInactiveCatalogPromotion
command and its handlerSylius\Bundle\CoreBundle\CatalogPromotion\CommandHandler\RemoveInactiveCatalogPromotionHandler
have been deprecated. UseSylius\Bundle\CoreBundle\CatalogPromotion\Command\RemoveCatalogPromotion
command instead. -
Passing
Symfony\Component\Messenger\MessageBusInterface
toSylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessor
as a second and third argument is deprecated. -
Not passing
Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionRemovalAnnouncerInterface
toSylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessor
as a second argument is deprecated. -
Not passing
Doctrine\Persistence\ObjectManager
toSylius\Component\Core\Updater\UnpaidOrdersStateUpdater
as a fifth argument is deprecated. -
To allow to autoconfigure order processors and cart context and define a priority for them in
1.13
we have introducedSylius\Bundle\OrderBundle\Attribute\AsCartContext
andSylius\Bundle\OrderBundle\Attribute\AsOrderProcessor
attributes. By default, Sylius still configures them using interfaces, but this way you cannot define a priority. If you want to define a priority, you need to set the following configuration in your_sylius.yaml
file:sylius_core: autoconfigure_with_attributes: true
and use one of the new attributes accordingly to a type of your class, e.g.:
<?php declare(strict_types=1); namespace App\OrderProcessor; use Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor; use Sylius\Component\Order\Model\OrderInterface; use Sylius\Component\Order\Processor\OrderProcessorInterface; #[AsOrderProcessor(priority: 10)] //priority is optional //#[AsOrderProcessor] can be used as well final class OrderProcessorWithAttributeStub implements OrderProcessorInterface { public function process(OrderInterface $order): void { } }
-
Not passing
Sylius\Component\Core\Checker\ProductVariantLowestPriceDisplayCheckerInterface
toSylius\Component\Core\Calculator\ProductVariantPriceCalculator
as a first argument is deprecated. -
Not passing an instance of
Symfony\Component\PropertyAccess\PropertyAccessorInterface
toSylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntityValidator
as the second argument is deprecated. -
Class
\Sylius\Bundle\ShopBundle\Calculator\OrderItemsSubtotalCalculator
has been deprecated. Order items subtotal calculation is now available on the Order model\Sylius\Component\Core\Model\Order::getItemsSubtotal
. -
The way of getting variants prices based on options has been changed, as such the following services were deprecated, please use their new counterpart.
- instead of
Sylius\Component\Core\Provider\ProductVariantsPricesProviderInterface
useSylius\Component\Core\Provider\ProductVariantMap\ProductVariantsMapProviderInterface
- instead of
Sylius\Component\Core\Provider\ProductVariantsPricesProvider
useSylius\Component\Core\Provider\ProductVariantMap\ProductVariantsPricesMapProvider
- instead of
Sylius\Bundle\CoreBundle\Templating\Helper\ProductVariantsPricesHelper
useSylius\Bundle\CoreBundle\Templating\Helper\ProductVariantsMapHelper
- instead of
Sylius\Bundle\CoreBundle\Twig\ProductVariantsPricesExtension
useSylius\Bundle\CoreBundle\Twig\ProductVariantsMapExtension
Subsequently, the
sylius_product_variant_prices
twig function is deprecated, usesylius_product_variants_map
instead.To add more data per variant create a service implementing the
Sylius\Component\Core\Provider\ProductVariantMap\ProductVariantMapProviderInterface
and tag it withsylius.product_variant_data_map_provider
. - instead of