25 KiB
UPGRADE FROM v1.13.X TO v1.14.0
Dependencies
- The minimum version of
sylius/resourceandsylius/resource-bundlehave been bumped to^1.11. Due to that the following namespaces have been updated throughout the codebase:
| Old namespace | New namespace |
|---|---|
Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent |
Sylius\Resource\Symfony\EventDispatcher\GenericEvent |
Sylius\Component\Resource\Exception\DeleteHandlingException |
Sylius\Resource\Exception\DeleteHandlingException |
Sylius\Component\Resource\Exception\RaceConditionException |
Sylius\Resource\Exception\RaceConditionException |
Sylius\Component\Resource\Exception\UnexpectedTypeException |
Sylius\Resource\Exception\UnexpectedTypeException |
Sylius\Component\Resource\Exception\UnsupportedMethodException |
Sylius\Resource\Exception\UnsupportedMethodException |
Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException |
Sylius\Resource\Exception\VariantWithNoOptionsValuesException |
Sylius\Component\Resource\Factory\FactoryInterface |
Sylius\Resource\Factory\FactoryInterface |
Sylius\Component\Resource\Generator\RandomnessGeneratorInterface |
Sylius\Resource\Generator\RandomnessGeneratorInterface |
Sylius\Component\Resource\Metadata\MetadataInterface |
Sylius\Resource\Metadata\MetadataInterface |
Sylius\Component\Resource\Metadata\Metadata |
Sylius\Resource\Metadata\Metadata |
Sylius\Component\Resource\Metadata\RegistryInterface |
Sylius\Resource\Metadata\RegistryInterface |
Sylius\Component\Resource\Model\CodeAwareInterface |
Sylius\Resource\Model\CodeAwareInterface |
Sylius\Component\Resource\Model\ResourceInterface |
Sylius\Resource\Model\ResourceInterface |
Sylius\Component\Resource\Model\TranslatableInterface |
Sylius\Resource\Model\TranslatableInterface |
Sylius\Component\Resource\Repository\InMemoryRepository |
Sylius\Resource\Doctrine\Persistence\InMemoryRepository |
Sylius\Component\Resource\Repository\RepositoryInterface |
Sylius\Resource\Doctrine\Persistence\RepositoryInterface |
Sylius\Component\Resource\ResourceActions |
Sylius\Resource\ResourceActions |
Sylius\Component\Resource\StateMachine\StateMachine |
Sylius\Resource\StateMachine\StateMachine |
Sylius\Component\Resource\Storage\StorageInterface |
Sylius\Resource\Storage\StorageInterface |
Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface |
Sylius\Resource\Translation\Provider\TranslationLocaleProviderInterface |
Sylius\Component\Resource\Translation\TranslatableEntityLocaleAssignerInterface |
Sylius\Resource\Translation\TranslatableEntityLocaleAssignerInterface |
The previous namespaces are still usable, but are considered deprecated and may be removed in future versions of Resource packages, update them at your own convenience.
Deprecations
-
Aliases for the following services have been introduced to standardize service IDs and will replace the incorrect IDs in Sylius 2.0:
Old ID New ID AttributeBundle sylius.form.type.attribute_type.select.choices_collectionsylius.form.type.attribute_type.configuration.select_attribute_choices_collectionsylius.attribute_type.select.value.translationssylius.form.type.attribute_type.configuration.select_attribute_value_translationssylius.validator.valid_text_attributesylius.validator.valid_text_attribute_configurationsylius.validator.valid_select_attributesylius.validator.valid_select_attribute_configurationAddressingBundle sylius.province_naming_providersylius.provider.province_namingsylius.zone_matchersylius.matcher.zonesylius.address_comparatorsylius.comparator.addressChannelBundle sylius.channel_collectorsylius.collector.channelCurrencyBundle sylius.currency_convertersylius.converter.currencysylius.currency_name_convertersylius.converter.currency_nameInventoryBundle sylius.availability_checker.defaultsylius.availability_checkerLocaleBundle Sylius\Bundle\LocaleBundle\Context\RequestHeaderBasedLocaleContextsylius.context.locale.request_header_basedsylius.locale_collection_providersylius.provider.locale_collectionsylius.locale_collection_provider.cahcedsylius.provider.locale_collection.cachedsylius.locale_providersylius.provider.localesylius.locale_convertersylius.converter.localeSylius\Bundle\LocaleBundle\Doctrine\EventListener\LocaleModificationListenersylius.doctrine.listener.locale_modificationMoneyBundle sylius.twig.extension.convert_amountsylius.twig.extension.convert_moneysylius.twig.extension.moneysylius.twig.extension.format_moneysylius.money_formattersylius.formatter.moneyOrderBundle sylius.order_modifiersylius.modifier.ordersylius.order_item_quantity_modifiersylius.modifier.order_item_quantitysylius.order_number_assignersylius.number_assigner.order_numbersylius.adjustments_aggregatorsylius.aggregator.adjustments_by_labelsylius.expired_carts_removersylius.remover.expired_cartssylius.sequential_order_number_generatorsylius.number_generator.sequential_orderSylius\Bundle\OrderBundle\Console\Command\RemoveExpiredCartsCommandsylius.console.command.remove_expired_cartsProductBundle sylius.form.type.sylius_product_associationssylius.form.type.product_associationssylius.form.event_subscriber.product_variant_generatorsylius.form.event_subscriber.generate_product_variantsSylius\Bundle\ProductBundle\Validator\ProductVariantOptionValuesConfigurationValidatorsylius.validator.product_variant_option_values_configurationsylius.validator.product_code_uniquenesssylius.validator.unique_simple_product_codesylius.product_variant_resolver.defaultsylius.resolver.product_variant.defaultsylius.available_product_option_values_resolversylius.resolver.available_product_option_valuesThe old service IDs are now deprecated and will be removed in Sylius 2.0. Please update your service references accordingly to ensure compatibility with Sylius 2.0.
-
For the following services, new aliases have been added in Sylius 1.14. These aliases will become the primary services IDs in Sylius 2.0, while the current service IDs will be converted into aliases:
Current ID New Alias AddressingBundle Sylius\Component\Addressing\Checker\ZoneDeletionCheckerInterfacesylius.checker.zone_deletionSylius\Component\Addressing\Checker\CountryProvincesDeletionCheckerInterfacesylius.checker.country_provinces_deletionLocaleBundle Sylius\Bundle\LocaleBundle\Checker\LocaleUsageCheckerInterfacesylius.checker.locale_usageProductBundle Sylius\Component\Product\Resolver\ProductVariantResolverInterfacesylius.resolver.product_variantWe recommend using the new aliases introduced in Sylius 1.14 to ensure compatibility with Sylius 2.0.
-
The following form extensions have been deprecated and will be removed in Sylius 2.0:
Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionScopeTypeExtensionSylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionActionTypeExtensionSylius\Bundle\CoreBundle\Form\Extension\CustomerTypeExtensionSylius\Bundle\CoreBundle\Form\Extension\LocaleTypeExtension
Starting with this version, form types will be extended using the parent form instead of through form extensions, like it's done in the
Sylius\Bundle\AdminBundle\Form\Type\CatalogPromotionScopeTypeandSylius\Bundle\AdminBundle\Form\Type\CatalogPromotionActionTypeclasses. -
Classes related to legacy validation of CatalogPromotions' configuration have been deprecated and will be remove in Sylius 2.0:
Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\FixedDiscountActionValidatorSylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForProductsScopeValidatorSylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForTaxonsScopeValidatorSylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForVariantsScopeValidatorSylius\Bundle\ApiBundle\Validator\CatalogPromotion\PercentageDiscountActionValidatorSylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionAction\FixedDiscountActionValidatorSylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForProductsScopeValidatorSylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForTaxonsScopeValidatorSylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForVariantsScopeValidatorSylius\Bundle\PromotionBundle\Validator\Constraints\CatalogPromotionActionSylius\Bundle\PromotionBundle\Validator\Constraints\CatalogPromotionScopeUse the regular Symfony validation constraints instead.
-
The class
Sylius\Bundle\CoreBundle\Twig\StateMachineExtensionhas been deprecated and will be removed in Sylius 2.0. UseSylius\Abstraction\StateMachine\Twig\StateMachineExtensioninstead. -
The class
Sylius\Bundle\CoreBundle\Console\Command\ShowAvailablePluginsCommandhas been deprecated and will be removed in Sylius 2.0. -
The class
Sylius\Bundle\CoreBundle\Console\Command\Model\PluginInfohas been deprecated and will be removed in Sylius 2.0. -
The class
Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriberhas been deprecated and will be removed in Sylius 2.0. -
The class
Sylius\Bundle\ApiBundle\Filter\Doctrine\PromotionCouponPromotionFilterhas been deprecated and will be removed in Sylius 2.0. -
The class
Sylius\Bundle\AdminBundle\EventListener\ResourceDeleteSubscriberhas been deprecated and will be removed in Sylius 2.0. It will be replaced with theResourceDeleteListener. -
Extending
\InvalidArgumentExceptionbySylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHandExceptionandSylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHoldExceptionis deprecated, instead they will extend\RuntimeExceptionin Sylius 2.0. -
Statistics related deprecations:
- The class
Sylius\Bundle\AdminBundle\Provider\StatisticsDataProviderand interfaceSylius\Bundle\AdminBundle\Provider\StatisticsDataProviderInterfacehave been deprecated and will be removed in Sylius 2.0. UseSylius\Component\Core\Statistics\Provider\StatisticsProviderandSylius\Component\Core\Statistics\Provider\StatisticsProviderInterfaceinstead. - The class
Sylius\Bundle\AdminBundle\Controller\Dashboard\StatisticsControllerhas been deprecated and will be removed in Sylius 2.0. - The route
sylius_admin_dashboard_statisticshas been deprecated and will be removed in Sylius 2.0. - The class
Sylius\Component\Core\Dashboard\DashboardStatisticshas been deprecated and will be removed in Sylius 2.0. - The class
Sylius\Component\Core\Dashboard\DashboardStatisticsProviderand interfaceSylius\Component\Core\Dashboard\DashboardStatisticsProviderInterfacehave been deprecated and will be removed in Sylius 2.0. - The class
Sylius\Component\Core\Dashboard\Intervalhas been deprecated and will be removed in Sylius 2.0. - The class
Sylius\Component\Core\Dashboard\SalesDataProviderand interfaceSylius\Component\Core\Dashboard\SalesDataProviderInterfacehave been deprecated and will be removed in Sylius 2.0. - The class
Sylius\Component\Core\Dashboard\SalesSummaryand interfaceSylius\Component\Core\Dashboard\SalesSummaryInterfacehave been deprecated and will be removed in Sylius 2.0.
- The class
-
The constructor signature of
Sylius\Bundle\AdminBundle\Action\ResendOrderConfirmationEmailActionhas been changed:use Symfony\Component\Routing\RouterInterface; public function __construct( private OrderRepositoryInterface $orderRepository, private OrderEmailManagerInterface|ResendOrderConfirmationEmailDispatcherInterface $orderEmailManager, private CsrfTokenManagerInterface $csrfTokenManager, private RequestStack|SessionInterface $requestStackOrSession, + private ?RouterInterface $router = null, ) -
The following templating helpers and its interfaces have been deprecated and will be removed in Sylius 2.0:
Sylius\Bundle\CoreBundle\Templating\Helper\CheckoutStepsHelperSylius\Bundle\CoreBundle\Templating\Helper\PriceHelperSylius\Bundle\CoreBundle\Templating\Helper\VariantResolverHelperSylius\Bundle\CurrencyBundle\Templating\Helper\CurrencyHelperSylius\Bundle\CurrencyBundle\Templating\Helper\CurrencyHelperInterfaceSylius\Bundle\InventoryBundle\Templating\Helper\InventoryHelperSylius\Bundle\LocaleBundle\Templating\Helper\LocaleHelperSylius\Bundle\LocaleBundle\Templating\Helper\LocaleHelperInterfaceSylius\Bundle\MoneyBundle\Templating\Helper\ConvertMoneyHelperSylius\Bundle\MoneyBundle\Templating\Helper\ConvertMoneyHelperInterfaceSylius\Bundle\MoneyBundle\Templating\Helper\FormatMoneyHelperSylius\Bundle\MoneyBundle\Templating\Helper\FormatMoneyHelperInterfaceSylius\Bundle\OrderBundle\Templating\Helper\AdjustmentsHelper
-
The following constructor signatures have been changed:
Sylius\Bundle\CoreBundle\Twig\CheckoutStepsExtensionuse Sylius\Component\Core\Checker\OrderPaymentMethodSelectionRequirementCheckerInterface; use Sylius\Component\Core\Checker\OrderShippingMethodSelectionRequirementCheckerInterface; public function __construct( - private CheckoutStepsHelper $checkoutStepsHelper, + private readonly CheckoutStepsHelper|OrderPaymentMethodSelectionRequirementCheckerInterface $checkoutStepsHelper, + private readonly ?OrderShippingMethodSelectionRequirementCheckerInterface $orderShippingMethodSelectionRequirementChecker = null, )Sylius\Bundle\CoreBundle\Twig\PriceExtensionuse Sylius\Component\Core\Calculator\ProductVariantPricesCalculatorInterface; public function __construct( - private PriceHelper $helper, + private readonly PriceHelper|ProductVariantPricesCalculatorInterface $helper, )Sylius\Bundle\CoreBundle\Twig\VariantResolverExtensionuse Sylius\Component\Product\Resolver\ProductVariantResolverInterface; public function __construct( - private VariantResolverHelper $helper, + private readonly VariantResolverHelper|ProductVariantResolverInterface $helper, )Sylius\Bundle\CurrencyBundle\Twig\CurrencyExtensionpublic function __construct( - private CurrencyHelperInterface $helper, + private ?CurrencyHelperInterface $helper = null, )Sylius\Bundle\InventoryBundle\Twig\InventoryExtensionuse Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface; public function __construct( - private InventoryHelper $helper, + private InventoryHelper|AvailabilityCheckerInterface $helper )Sylius\Bundle\LocaleBundle\Twig\LocaleExtensionuse Sylius\Component\Locale\Context\LocaleContextInterface; use Sylius\Component\Locale\Converter\LocaleConverterInterface; public function __construct( - private LocaleHelperInterface $localeHelper, + private LocaleHelperInterface|LocaleConverterInterface $localeHelper, + private ?LocaleContextInterface $localeContext = null, )Sylius\Bundle\MoneyBundle\Twig\ConvertMoneyExtensionuse Sylius\Component\Currency\Converter\CurrencyConverterInterface; public function __construct( - private ConvertMoneyHelperInterface $helper, + private ConvertMoneyHelperInterface|CurrencyConverterInterface $helper, )Sylius\Bundle\MoneyBundle\Twig\FormatMoneyExtensionuse Sylius\Bundle\MoneyBundle\Formatter\MoneyFormatterInterface; public function __construct( - private FormatMoneyHelperInterface $helper, + private private FormatMoneyHelperInterface|MoneyFormatterInterface $helper, )Sylius\Bundle\OrderBundle\Twig\AggregateAdjustmentsExtensionuse Sylius\Component\Order\Aggregator\AdjustmentsAggregatorInterface; public function __construct( - private AdjustmentsHelper $adjustmentsHelper, + private AdjustmentsHelper|AdjustmentsAggregatorInterface $adjustmentsHelper, ) -
The following routes has been deprecated and will be removed in Sylius 2.0:
sylius_admin_ajax_all_product_variants_by_codessylius_admin_ajax_all_product_variants_by_phrasesylius_admin_ajax_customer_group_by_codesylius_admin_ajax_customer_groups_by_phrasesylius_admin_ajax_find_product_optionssylius_admin_ajax_generate_product_slugsylius_admin_ajax_generate_taxon_slugsylius_admin_ajax_product_by_codesylius_admin_ajax_product_by_name_phrasesylius_admin_ajax_product_indexsylius_admin_ajax_product_options_by_phrasesylius_admin_ajax_products_by_phrasesylius_admin_ajax_product_variants_by_codessylius_admin_ajax_product_variants_by_phrasesylius_admin_ajax_taxon_by_codesylius_admin_ajax_taxon_by_name_phrasesylius_admin_ajax_taxon_leafssylius_admin_ajax_taxon_root_nodessylius_admin_dashboard_statisticssylius_admin_get_attribute_typessylius_admin_get_payment_gatewayssylius_admin_get_product_attributessylius_admin_partial_address_log_entry_indexsylius_admin_partial_catalog_promotion_showsylius_admin_partial_channel_indexsylius_admin_partial_customer_latestsylius_admin_partial_customer_showsylius_admin_partial_order_latestsylius_admin_partial_order_latest_in_channelsylius_admin_partial_product_showsylius_admin_partial_promotion_showsylius_admin_partial_taxon_showsylius_admin_partial_taxon_treesylius_admin_render_attribute_formssylius_shop_ajax_cart_add_itemsylius_shop_ajax_cart_item_removesylius_shop_ajax_user_check_actionsylius_shop_partial_cart_summarysylius_shop_partial_cart_add_itemsylius_shop_partial_channel_menu_taxon_indexsylius_shop_partial_product_association_showsylius_shop_partial_product_index_latestsylius_shop_partial_product_review_latestsylius_shop_partial_product_show_by_slugsylius_shop_partial_taxon_index_by_codesylius_shop_partial_taxon_show_by_slug