-
Class
Sylius\Component\Core\Promotion\Updater\Rule\TotalOfItemsFromTaxonRuleUpdater
has been deprecated, as it is no more used. -
Class
Sylius\Component\Core\Promotion\Updater\Rule\ContainsProductRuleUpdater
has been deprecated, as it is no more used. -
Class
Sylius\Bundle\ProductBundle\Form\Type\ProductOptionChoiceType
has been deprecated. UseSylius\Bundle\ProductBundle\Form\Type\ProductOptionAutocompleteType
instead. -
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 ease customization we've introduces attributes for some services in
1.13
:Sylius\Bundle\OrderBundle\Attribute\AsCartContext
for cart contextsSylius\Bundle\OrderBundle\Attribute\AsOrderProcessor
for order processorsSylius\Bundle\ProductBundle\Attribute\AsProductVariantResolver
for product variant resolvers
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 the 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 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. -
Not passing an instance of
Sylius\Component\Core\Payment\Remover\OrderPaymentsRemoverInterface
and a collection of unprocessable order states toSylius\Component\Core\OrderProcessing\OrderPaymentProcessor
as the third and fourth arguments respectively is deprecated. -
Not passing an instance of
Sylius\Component\Core\Distributor\ProportionalIntegerDistributorInterface
toSylius\Component\Core\Taxation\Applicator\OrderItemsTaxesApplicator
and toSylius\Component\Core\Taxation\Applicator\OrderItemUnitsTaxesApplicator
as the last 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\Component\Core\Provider\ProductVariantMap\ProductVariantsPricesMapProvider
- 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
-
Using Guzzle 6 has been deprecated in favor of Symfony HTTP Client. If you want to still use Guzzle 6 or Guzzle 7, you need to install
composer require php-http/guzzle6-adapter
orcomposer require php-http/guzzle7-adapter
depending on your Guzzle version. Subsequently, you need to register the adapter as aPsr\Http\Client\ClientInterface
service as the following:services: Psr\Http\Client\ClientInterface: class: Http\Adapter\Guzzle7\Client # for Guzzle 6 use Http\Adapter\Guzzle6\Client instead
-
The constructor of
Sylius\Bundle\AdminBundle\Controller\NotificationController
has been changed:public function __construct( - private ClientInterface $client, - private MessageFactory $messageFactory, + private ClientInterface|DeprecatedClientInterface $client, + private RequestFactoryInterface|MessageFactory $requestFactory, private string $hubUri, private string $environment, + private ?StreamFactoryInterface $streamFactory = null, ) { ... }
-
The
sylius.http_message_factory
service has been deprecated. UsePsr\Http\Message\RequestFactoryInterface
instead. -
The
sylius.http_client
has become an alias topsr18.http_client
service. -
The
sylius.payum.http_client
has become a service ID of newly createdSylius\Bundle\PayumBundle\HttpClient\HttpClient
. -
Validation translation key
sylius.review.rating.range
has been replaced bysylius.review.rating.not_in_range
in all places used by Sylius. Thesylius.review.rating.range
has been left for backward compatibility and will be removed in Sylius 2.0. -
The
payum/payum
package has been replaced by concrete packages likepayum/core
,payum/offline
orpayum/paypal-express-checkout-nvp
. If you need any other component so far provided bypayum/payum
package, you need to install it explicitly. -
PostgreSQL migration support has been introduced. If you are using PostgreSQL, we assume that you have already created a database schema in some way. All you need to do is run migrations, which will mark all migrations created before Sylius 1.13 as executed.
-
Product variants resolving has been refactored for better extendability. The tag
sylius.product_variant_resolver.default
has been removed as it was never used.All internal usages of service
sylius.product_variant_resolver.default
have been switched toSylius\Component\Product\Resolver\ProductVariantResolverInterface
, if you have been using thesylius.product_variant_resolver.default
service apply this change accordingly. -
Due to optimizations of the Order's grid the
Sylius\Component\Core\Repository\OrderRepositoryInterface::createSearchListQueryBuilder
method bas been deprecated and replaced bySylius\Component\Core\Repository\OrderRepositoryInterface::createCriteriaAwareSearchListQueryBuilder
. AlsoSylius\Component\Core\Repository\OrderRepositoryInterface::createByCustomerIdQueryBuilder
has been deprecated and replaced bySylius\Component\Core\Repository\OrderRepositoryInterface::createByCustomerIdCriteriaAwareQueryBuilder
for the same reason. Both changes affectsylius_admin_order
andsylius_admin_customer_order
grids configuration. -
We have explicitly added relationships between product and reviews and between product and attributes in XML mappings. Because of that, the subscribers
Sylius\Bundle\AttributeBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber
andSylius\Bundle\ReviewBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber
have changed so that it does not add a relationship if one already exists. If you have overwritten or decorated it, there may be a need to update it. -
Passing an instance of
Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface
as the first argument toSylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration\SelectAttributeChoicesCollectionType
has been deprecated. -
The
sylius_admin_ajax_taxon_move
route has been deprecated. If you're relaying on it, consider migrating to newsylius_admin_ajax_taxon_move_up
andsylius_admin_ajax_taxon_move_down
routes. -
Not passing a
$fileLocator
toSylius\Bundle\CoreBundle\Fixture\Factory\ProductExampleFactory
constructor is deprecated and will be prohibited in Sylius 2.0.