2.7 KiB
UPGRADE FROM v1.12.X TO v1.13.0
-
Starting with Sylius 1.13, the
SyliusPriceHistoryPluginis 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\RemoveInactiveCatalogPromotioncommand and its handlerSylius\Bundle\CoreBundle\CatalogPromotion\CommandHandler\RemoveInactiveCatalogPromotionHandlerhave been deprecated. UseSylius\Bundle\CoreBundle\CatalogPromotion\Command\RemoveCatalogPromotioncommand instead. -
Passing
Symfony\Component\Messenger\MessageBusInterfacetoSylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessoras a second and third argument is deprecated. -
Not passing
Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionRemovalAnnouncerInterfacetoSylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessoras a second argument is deprecated. -
Not passing
Doctrine\Persistence\ObjectManagertoSylius\Component\Core\Updater\UnpaidOrdersStateUpdateras a fifth argument is deprecated. -
To allow to autoconfigure order processors and cart context and define a priority for them in
1.13we have introducedSylius\Bundle\OrderBundle\Attribute\AsCartContextandSylius\Bundle\OrderBundle\Attribute\AsOrderProcessorattributes. 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.yamlfile:sylius_core: autoconfigure_with_attributes: trueand 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\ProductVariantLowestPriceDisplayCheckerInterfacetoSylius\Component\Core\Calculator\ProductVariantPriceCalculatoras a first argument is deprecated. -
Not passing an instance of
Symfony\Component\PropertyAccess\PropertyAccessorInterfacetoSylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntityValidatoras the second argument is deprecated.