From 11a51e9e80239b66ce57b7d31f7dc115a70615de Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Fri, 8 Nov 2024 03:14:56 +0100 Subject: [PATCH 1/7] [Upgrade] Refine Sylius 1.14 upgrade guide --- UPGRADE-1.14.md | 220 ++++++++++++++++++++++++------------------------ 1 file changed, 110 insertions(+), 110 deletions(-) diff --git a/UPGRADE-1.14.md b/UPGRADE-1.14.md index 4afd87b231..6510cfc097 100644 --- a/UPGRADE-1.14.md +++ b/UPGRADE-1.14.md @@ -1,6 +1,6 @@ # UPGRADE FROM `v1.13.X` TO `v1.14.0` -### Dependencies +## Dependencies 1. The minimum version of `sylius/resource` and `sylius/resource-bundle` have been bumped to `^1.11`. Due to that the following namespaces have been updated throughout the codebase: @@ -29,7 +29,7 @@ | `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. +The old namespaces are deprecated and may be removed in future versions. Update your code to use the new namespaces. 2. Package `enshrined/svg-sanitize` has been removed from the project due to license incompatibility with Sylius. You can still use it in your project by adding it manually: @@ -43,7 +43,7 @@ allowed_image_mime_types: ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/svg+xml'] ``` -### Deprecations +## New Service Aliases 1. Aliases for the following services have been introduced to standardize service IDs and will replace the incorrect IDs in Sylius 2.0: @@ -621,14 +621,16 @@ 1. Aliases for the following `knp_menu.menu_builder` service tags have been introduced to standardize tag aliases and will replace the incorrect aliases in Sylius 2.0: - | Old Alias | New Alias | - |-----------------------|-----------------------| - | **AdminBundle** | | - | `sylius.admin.main` | `sylius_admin.main` | - | **ShopBundle** | | - | `sylius.shop.account` | `sylius_shop.account` | + | Old Alias | New Alias | + |-----------------------|-----------------------| + | **AdminBundle** | | + | `sylius.admin.main` | `sylius_admin.main` | + | **ShopBundle** | | + | `sylius.shop.account` | `sylius_shop.account` | - The old alias are now deprecated and will be removed in Sylius 2.0. + The old alias are now deprecated and will be removed in Sylius 2.0. + +## Service Definition Deprecations 1. The definition of the service `Sylius\Bundle\PromotionBundle\Form\Type\CatalogPromotionAction\PercentageDiscountActionConfigurationType` in the `PromotionBundle` has been deprecated and will be removed in Sylius 2.0. This definition has been copied to the `CoreBundle`. @@ -639,98 +641,88 @@ 1. The following class definitions will be moved to `PromotionBundle` in Sylius 2.0: - `Sylius\Bundle\PromotionBundle\Form\Type\CatalogPromotionScopeType` -1. The following class will be moved to `ShopBundle` in Sylius 2.0: - - `Sylius\Bundle\CoreBundle\Theme\ChannelBasedThemeContext` +## Classes and Interfaces Deprecations - 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\CatalogPromotionScopeType` and `Sylius\Bundle\AdminBundle\Form\Type\CatalogPromotionActionType` classes. +| Deprecated class/interface | Will be replaced with | +|----------------------------------------------------------------------|-------------------------------------------------------------------------| +| `Sylius\Bundle\AdminBundle\Provider\StatisticsDataProvider` | `Sylius\Component\Core\Statistics\Provider\StatisticsProvider` | +| `Sylius\Bundle\AdminBundle\Provider\StatisticsDataProviderInterface` | `Sylius\Component\Core\Statistics\Provider\StatisticsProviderInterface` | +| `Sylius\Bundle\CoreBundle\Twig\StateMachineExtension` | `Sylius\Abstraction\StateMachine\Twig\StateMachineExtension` | -1. Classes related to legacy validation of CatalogPromotions' configuration have been deprecated and will be remove in Sylius 2.0: - - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\FixedDiscountActionValidator` - - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForProductsScopeValidator` - - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForTaxonsScopeValidator` - - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForVariantsScopeValidator` - - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\PercentageDiscountActionValidator` - - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionAction\FixedDiscountActionValidator` - - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForProductsScopeValidator` - - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForTaxonsScopeValidator` - - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForVariantsScopeValidator` - - `Sylius\Bundle\PromotionBundle\Validator\Constraints\CatalogPromotionAction` - - `Sylius\Bundle\PromotionBundle\Validator\Constraints\CatalogPromotionScope` - Use the regular Symfony validation constraints instead. - -1. The class `Sylius\Bundle\CoreBundle\Twig\StateMachineExtension` has been deprecated and will be removed in Sylius 2.0. Use `Sylius\Abstraction\StateMachine\Twig\StateMachineExtension` instead. - -1. The class `Sylius\Bundle\CoreBundle\Console\Command\ShowAvailablePluginsCommand` has been deprecated and will be removed in Sylius 2.0. - -1. The class `Sylius\Bundle\CoreBundle\Console\Command\Model\PluginInfo` has been deprecated and will be removed in Sylius 2.0. - -1. The class `Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriber` has been deprecated and will be removed in Sylius 2.0. - -1. The class `Sylius\Bundle\AdminBundle\EventListener\ResourceDeleteSubscriber` has been deprecated and will be removed in Sylius 2.0. - It will be replaced with the `ResourceDeleteListener`. - -1. The following exceptions have been deprecated and will be removed in Sylius 2.0: - - `Sylius\Bundle\ApiBundle\Exception\CannotRemoveCurrentlyLoggedInUser` - - `Sylius\Bundle\ApiBundle\Exception\ChannelCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\PaymentMethodCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\ProductAttributeCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\ProductCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\ProductVariantCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\PromotionCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\PromotionCouponCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\ProvinceCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\ShippingMethodCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\TaxonCannotBeRemoved` - - `Sylius\Bundle\ApiBundle\Exception\ZoneCannotBeRemoved` - - All of these exceptions will be replaced with the `Sylius\Component\Core\Exception\ResourceDeleteException` exception. +### Exceptions + - `Sylius\Bundle\ApiBundle\Exception\CannotRemoveCurrentlyLoggedInUser` + - `Sylius\Bundle\ApiBundle\Exception\ChannelCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\PaymentMethodCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\ProductAttributeCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\ProductCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\ProductVariantCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\PromotionCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\PromotionCouponCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\ProvinceCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\ShippingMethodCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\TaxonCannotBeRemoved` + - `Sylius\Bundle\ApiBundle\Exception\ZoneCannotBeRemoved` + +### Classes related to legacy validation of CatalogPromotions. Use the regular Symfony validation constraints instead. + - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\FixedDiscountActionValidator` + - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForProductsScopeValidator` + - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForTaxonsScopeValidator` + - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\ForVariantsScopeValidator` + - `Sylius\Bundle\ApiBundle\Validator\CatalogPromotion\PercentageDiscountActionValidator` + - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionAction\FixedDiscountActionValidator` + - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForProductsScopeValidator` + - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForTaxonsScopeValidator` + - `Sylius\Bundle\CoreBundle\CatalogPromotion\Validator\CatalogPromotionScope\ForVariantsScopeValidator` + - `Sylius\Bundle\PromotionBundle\Validator\Constraints\CatalogPromotionAction` + - `Sylius\Bundle\PromotionBundle\Validator\Constraints\CatalogPromotionScope` + +### Statistics + - `Sylius\Bundle\AdminBundle\Controller\Dashboard\StatisticsController` + - `Sylius\Component\Core\Dashboard\DashboardStatistics` + - `Sylius\Component\Core\Dashboard\DashboardStatisticsProvider` + - `Sylius\Component\Core\Dashboard\DashboardStatisticsProviderInterface` + - `Sylius\Component\Core\Dashboard\Interval` + - `Sylius\Component\Core\Dashboard\SalesDataProvider` + - `Sylius\Component\Core\Dashboard\SalesDataProviderInterface` + - `Sylius\Component\Core\Dashboard\SalesSummary` + - `Sylius\Component\Core\Dashboard\SalesSummaryInterface` + +### Templating helpers and its interfaces + - `Sylius\Bundle\CoreBundle\Templating\Helper\CheckoutStepsHelper` + - `Sylius\Bundle\CoreBundle\Templating\Helper\PriceHelper` + - `Sylius\Bundle\CoreBundle\Templating\Helper\VariantResolverHelper` + - `Sylius\Bundle\CurrencyBundle\Templating\Helper\CurrencyHelper` + - `Sylius\Bundle\CurrencyBundle\Templating\Helper\CurrencyHelperInterface` + - `Sylius\Bundle\InventoryBundle\Templating\Helper\InventoryHelper` + - `Sylius\Bundle\LocaleBundle\Templating\Helper\LocaleHelper` + - `Sylius\Bundle\LocaleBundle\Templating\Helper\LocaleHelperInterface` + - `Sylius\Bundle\MoneyBundle\Templating\Helper\ConvertMoneyHelper` + - `Sylius\Bundle\MoneyBundle\Templating\Helper\ConvertMoneyHelperInterface` + - `Sylius\Bundle\MoneyBundle\Templating\Helper\FormatMoneyHelper` + - `Sylius\Bundle\MoneyBundle\Templating\Helper\FormatMoneyHelperInterface` + - `Sylius\Bundle\OrderBundle\Templating\Helper\AdjustmentsHelper` + +### Security related classes and interfaces + - `Sylius\Bundle\UserBundle\Security\UserLogin` + - `Sylius\Bundle\UserBundle\Security\UserLoginInterface` + - `Sylius\Bundle\UserBundle\Security\UserPasswordHasher` + - `Sylius\Component\User\Security\UserPasswordHasherInterface` + +### Miscellaneous + - `Sylius\Bundle\AddressingBundle\Controller\ProvinceController` + - `Sylius\Bundle\AdminBundle\Controller\NotificationController` + - `Sylius\Bundle\AdminBundle\EventListener\ResourceDeleteSubscriber` + - `Sylius\Bundle\CoreBundle\Console\Command\Model\PluginInfo` + - `Sylius\Bundle\CoreBundle\Console\Command\ShowAvailablePluginsCommand` + - `Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriber` + - `Sylius\Bundle\CoreBundle\Theme\ChannelBasedThemeContext` 1. Extending `\InvalidArgumentException` by `Sylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHandException` and `Sylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHoldException` is deprecated, instead they will extend `\RuntimeException` in Sylius 2.0. -1. Statistics related deprecations: - - The class `Sylius\Bundle\AdminBundle\Provider\StatisticsDataProvider` and interface `Sylius\Bundle\AdminBundle\Provider\StatisticsDataProviderInterface` have been deprecated and will be removed in Sylius 2.0. - Use `Sylius\Component\Core\Statistics\Provider\StatisticsProvider` and `Sylius\Component\Core\Statistics\Provider\StatisticsProviderInterface` instead. - - The class `Sylius\Bundle\AdminBundle\Controller\Dashboard\StatisticsController` has been deprecated and will be removed in Sylius 2.0. - - The route `sylius_admin_dashboard_statistics` has been deprecated and will be removed in Sylius 2.0. - - The class `Sylius\Component\Core\Dashboard\DashboardStatistics` has been deprecated and will be removed in Sylius 2.0. - - The class `Sylius\Component\Core\Dashboard\DashboardStatisticsProvider` and interface `Sylius\Component\Core\Dashboard\DashboardStatisticsProviderInterface` have been deprecated and will be removed in Sylius 2.0. - - The class `Sylius\Component\Core\Dashboard\Interval` has been deprecated and will be removed in Sylius 2.0. - - The class `Sylius\Component\Core\Dashboard\SalesDataProvider` and interface `Sylius\Component\Core\Dashboard\SalesDataProviderInterface` have been deprecated and will be removed in Sylius 2.0. - - The class `Sylius\Component\Core\Dashboard\SalesSummary` and interface `Sylius\Component\Core\Dashboard\SalesSummaryInterface` have been deprecated and will be removed in Sylius 2.0. - -1. The following security related classes and interfaces have been deprecated, and they will be removed in 2.0: - - `Sylius\Bundle\UserBundle\Security\UserLogin` - - `Sylius\Bundle\UserBundle\Security\UserLoginInterface` - - `Sylius\Bundle\UserBundle\Security\UserPasswordHasher` - - `Sylius\Bundle\UserBundle\Security\UserPasswordHasherInterface` - -1. The following security related services and aliases have been deprecated, and they will be removed in 2.0: - - `sylius.security.password_hasher` - - `sylius.security.user_login` - - `Sylius\Bundle\UserBundle\Security\UserLoginInterface` - - `Sylius\Component\User\Security\UserPasswordHasherInterface` - -1. The constructor signature of `Sylius\Bundle\AdminBundle\Action\ResendOrderConfirmationEmailAction` has been changed: - ```diff - 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, - ) - ``` - -1. The following classes have been deprecated and will be removed in Sylius 2.0: - - **AddressingBundle** - - `Sylius\Bundle\AddressingBundle\Controller\ProvinceController` +1. The following services have been deprecated and will be removed in Sylius 2.0: - **AdminBundle** - - `Sylius\Bundle\AdminBundle\Controller\NotificationController` - `sylius.controller.admin.notification` - `Sylius\Bundle\AdminBundle\Controller\Dashboard\StatisticsController` - `Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionActionTypeExtension` @@ -856,23 +848,25 @@ - `Sylius\Bundle\UiBundle\Twig\TemplateEventExtension` - `Sylius\Bundle\UiBundle\Twig\TestFormAttributeExtension` - `Sylius\Bundle\UiBundle\Twig\TestHtmlAttributeExtension` + - **UserBundle** + - `sylius.security.password_hasher` + - `sylius.security.user_login` -1. The following templating helpers and its interfaces have been deprecated and will be removed in Sylius 2.0: - - `Sylius\Bundle\CoreBundle\Templating\Helper\CheckoutStepsHelper` - - `Sylius\Bundle\CoreBundle\Templating\Helper\PriceHelper` - - `Sylius\Bundle\CoreBundle\Templating\Helper\VariantResolverHelper` - - `Sylius\Bundle\CurrencyBundle\Templating\Helper\CurrencyHelper` - - `Sylius\Bundle\CurrencyBundle\Templating\Helper\CurrencyHelperInterface` - - `Sylius\Bundle\InventoryBundle\Templating\Helper\InventoryHelper` - - `Sylius\Bundle\LocaleBundle\Templating\Helper\LocaleHelper` - - `Sylius\Bundle\LocaleBundle\Templating\Helper\LocaleHelperInterface` - - `Sylius\Bundle\MoneyBundle\Templating\Helper\ConvertMoneyHelper` - - `Sylius\Bundle\MoneyBundle\Templating\Helper\ConvertMoneyHelperInterface` - - `Sylius\Bundle\MoneyBundle\Templating\Helper\FormatMoneyHelper` - - `Sylius\Bundle\MoneyBundle\Templating\Helper\FormatMoneyHelperInterface` - - `Sylius\Bundle\OrderBundle\Templating\Helper\AdjustmentsHelper` +## Constructor Signature Changes 1. The following constructor signatures have been changed: + `Sylius\Bundle\AdminBundle\Action\ResendOrderConfirmationEmailAction` + ```diff + 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, + ) + ``` `Sylius\Bundle\CoreBundle\Twig\CheckoutStepsExtension` ```diff @@ -970,7 +964,7 @@ ) ``` -1. The following routes has been deprecated and will be removed in Sylius 2.0: +## Routes deprecations - `sylius_admin_ajax_all_product_variants_by_codes` - `sylius_admin_ajax_all_product_variants_by_phrase` - `sylius_admin_ajax_customer_group_by_code` @@ -982,9 +976,9 @@ - `sylius_admin_ajax_product_by_name_phrase` - `sylius_admin_ajax_product_index` - `sylius_admin_ajax_product_options_by_phrase` - - `sylius_admin_ajax_products_by_phrase` - `sylius_admin_ajax_product_variants_by_codes` - `sylius_admin_ajax_product_variants_by_phrase` + - `sylius_admin_ajax_products_by_phrase` - `sylius_admin_ajax_taxon_by_code` - `sylius_admin_ajax_taxon_by_name_phrase` - `sylius_admin_ajax_taxon_leafs` @@ -1018,6 +1012,8 @@ - `sylius_shop_partial_taxon_index_by_code` - `sylius_shop_partial_taxon_show_by_slug` +## Configuration + 1. The `sylius_core.state_machine` configuration parameter is deprecated and will be removed in 2.0. Use `sylius_state_machine_abstraction.state_machine` instead. @@ -1036,6 +1032,10 @@ * `sylius.{user_type}_user.pin_generator.password_reset` * `sylius.{user_type}_user.pin_uniqueness_checker.password_reset` +## Miscellaneous + +1. Starting with Sylius 1.14, 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\CatalogPromotionScopeType` and `Sylius\Bundle\AdminBundle\Form\Type\CatalogPromotionActionType` classes. + ### Testing Suite 1. The constructor signature of `Sylius\Component\Core\Test\Services\DefaultChannelFactory` has been changed: From ce110408dc333540eba6aa5500d75688e27f81ab Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Fri, 8 Nov 2024 03:15:31 +0100 Subject: [PATCH 2/7] [Admin] Include FCQN in the deprecation message --- .../AdminBundle/EventListener/ResourceDeleteSubscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php b/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php index e610716c80..8a8cee74a2 100644 --- a/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php +++ b/src/Sylius/Bundle/AdminBundle/EventListener/ResourceDeleteSubscriber.php @@ -28,7 +28,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; trigger_deprecation( 'sylius/admin-bundle', '1.14', - 'The "%s" class is deprecated and will be removed in Sylius 2.0. It will be replaced with the ResourceDeleteListener.', + 'The "%s" class is deprecated and will be removed in Sylius 2.0. It will be replaced with the "Sylius\Bundle\AdminBundle\EventListener\ResourceDeleteListener".', ResourceDeleteSubscriber::class, ); From 5a24b51ebf4ad46f290129ff45385c32e66a8cbf Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Mon, 11 Nov 2024 03:32:32 +0100 Subject: [PATCH 3/7] [Upgrade] Correct deprecated services and classes list --- UPGRADE-1.14.md | 101 +++++++++++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 44 deletions(-) diff --git a/UPGRADE-1.14.md b/UPGRADE-1.14.md index 6510cfc097..12cafb7d76 100644 --- a/UPGRADE-1.14.md +++ b/UPGRADE-1.14.md @@ -188,7 +188,6 @@ The old namespaces are deprecated and may be removed in future versions. Update | `Sylius\Bundle\ApiBundle\Validator\Constraints\UniqueReviewerEmailValidator` | `sylius_api.validator.unique_reviewer_email` | | `Sylius\Bundle\ApiBundle\Validator\Constraints\AdminResetPasswordTokenNonExpiredValidator` | `sylius_api.validator.admin_reset_password_token_non_expired` | | `sylius.validator.order_address_requirement` | `sylius_api.validator.order_address_requirement` | - | `Sylius\Bundle\ApiBundle\PropertyInfo\Extractor\EmptyPropertyListExtractor` | `sylius_api.extractor.property_info.empty_property_list` | | `Sylius\Bundle\ApiBundle\SectionResolver\AdminApiUriBasedSectionResolver` | `sylius_api.section_resolver.admin_api_uri_based` | | `Sylius\Bundle\ApiBundle\SectionResolver\ShopApiUriBasedSectionResolver` | `sylius_api.section_resolver.shop_api_uri_based` | | `Sylius\Bundle\ApiBundle\EventListener\ApiCartBlamerListener` | `sylius_api.listener.api_cart_blamer` | @@ -710,12 +709,50 @@ The old namespaces are deprecated and may be removed in future versions. Update ### Miscellaneous - `Sylius\Bundle\AddressingBundle\Controller\ProvinceController` + - `Sylius\Bundle\AdminBundle\Controller\Dashboard\StatisticsController` - `Sylius\Bundle\AdminBundle\Controller\NotificationController` - `Sylius\Bundle\AdminBundle\EventListener\ResourceDeleteSubscriber` + - `Sylius\Bundle\AdminBundle\Menu\CustomerShowMenuBuilder` + - `Sylius\Bundle\AdminBundle\Menu\OrderShowMenuBuilder` + - `Sylius\Bundle\AdminBundle\Menu\ProductFormMenuBuilder` + - `Sylius\Bundle\AdminBundle\Menu\ProductUpdateMenuBuilder` + - `Sylius\Bundle\AdminBundle\Menu\ProductVariantFormMenuBuilder` + - `Sylius\Bundle\AdminBundle\Menu\PromotionUpdateMenuBuilder` + - `Sylius\Bundle\AdminBundle\Twig\NotificationWidgetExtension` + - `Sylius\Bundle\ApiBundle\ApiPlatform\Bridge\Symfony\Routing\CachedRouteNameResolver` + - `Sylius\Bundle\ApiBundle\ApiPlatform\Bridge\Symfony\Routing\RouteNameResolver` + - `Sylius\Bundle\ApiBundle\ApiPlatform\Factory\MergingExtractorResourceMetadataFactory` + - `Sylius\Bundle\ApiBundle\DataTransformer\CommandAwareInputDataTransformer` + - `Sylius\Bundle\ApiBundle\DataTransformer\CommandDataTransformerInterface` + - `Sylius\Bundle\ApiBundle\EventListener\PostgreSQLDriverExceptionListener` + - `Sylius\Bundle\ApiBundle\PropertyInfo\Extractor\EmptyPropertyListExtractor` + - `Sylius\Bundle\ApiBundle\Validator\ResourceApiInputDataPropertiesValidator` - `Sylius\Bundle\CoreBundle\Console\Command\Model\PluginInfo` - `Sylius\Bundle\CoreBundle\Console\Command\ShowAvailablePluginsCommand` - `Sylius\Bundle\CoreBundle\Form\EventSubscriber\AddUserFormSubscriber` + - `Sylius\Bundle\CoreBundle\Form\Extension\CountryTypeExtension` + - `Sylius\Bundle\CoreBundle\Form\Extension\CustomerTypeExtension` + - `Sylius\Bundle\CoreBundle\Form\Extension\LocaleTypeExtension` + - `Sylius\Bundle\CoreBundle\Form\Type\Grid\Filter\EntitiesFilterType` - `Sylius\Bundle\CoreBundle\Theme\ChannelBasedThemeContext` + - `Sylius\Bundle\CoreBundle\Twig\FilterExtension` + - `Sylius\Bundle\PayumBundle\Action\Paypal\ExpressCheckout\ConvertPaymentAction` + - `Sylius\Bundle\PayumBundle\Controller\PayumController` + - `Sylius\Bundle\PayumBundle\Form\Type\PaypalGatewayConfigurationType` + - `Sylius\Bundle\PayumBundle\Form\Type\StripeGatewayConfigurationType` + - `Sylius\Bundle\PayumBundle\Validator\Constraints\GatewayFactoryExists` + - `Sylius\Bundle\ProductBundle\Controller\ProductSlugController` + - `Sylius\Bundle\ShopBundle\Controller\HomepageController` + - `Sylius\Bundle\ShopBundle\Controller\SecurityWidgetController` + - `Sylius\Bundle\UiBundle\ContextProvider\DefaultContextProvider` + - `Sylius\Bundle\UiBundle\Renderer\DelegatingTemplateEventRenderer` + - `Sylius\Bundle\UiBundle\Renderer\TwigTemplateBlockRenderer` + - `Sylius\Bundle\UiBundle\Storage\FilterStorageInterface` + - `Sylius\Bundle\UiBundle\Twig\SortByExtension` + - `Sylius\Bundle\UiBundle\Twig\TemplateEventExtension` + - `Sylius\Bundle\UiBundle\Twig\TestFormAttributeExtension` + - `Sylius\Bundle\UiBundle\Twig\TestHtmlAttributeExtension` + - `Sylius\Component\Core\Grid\Filter\EntitiesFilter` 1. Extending `\InvalidArgumentException` by `Sylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHandException` and `Sylius\Component\Core\Inventory\Exception\NotEnoughUnitsOnHoldException` is deprecated, instead they will extend @@ -724,21 +761,12 @@ The old namespaces are deprecated and may be removed in future versions. Update 1. The following services have been deprecated and will be removed in Sylius 2.0: - **AdminBundle** - `sylius.controller.admin.notification` - - `Sylius\Bundle\AdminBundle\Controller\Dashboard\StatisticsController` - `Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionActionTypeExtension` - `Sylius\Bundle\AdminBundle\Form\Extension\CatalogPromotionScopeTypeExtension` - - `Sylius\Bundle\AdminBundle\Menu\CustomerShowMenuBuilder` - - `Sylius\Bundle\AdminBundle\Menu\OrderShowMenuBuilder` - - `Sylius\Bundle\AdminBundle\Menu\ProductFormMenuBuilder` - - `Sylius\Bundle\AdminBundle\Menu\ProductUpdateMenuBuilder` - - `Sylius\Bundle\AdminBundle\Menu\ProductVariantFormMenuBuilder` - - `Sylius\Bundle\AdminBundle\Menu\PromotionUpdateMenuBuilder` - - `Sylius\Bundle\AdminBundle\Twig\NotificationWidgetExtension` - **ApiBundle** + - `api_platform.action.post_item` + - `sylius.listener.api_postgresql_driver_exception_listener` - `Sylius\Bundle\ApiBundle\ApiPlatform\ApiResourceConfigurationMerger` - - `Sylius\Bundle\ApiBundle\ApiPlatform\Bridge\Symfony\Routing\CachedRouteNameResolver` - - `Sylius\Bundle\ApiBundle\ApiPlatform\Bridge\Symfony\Routing\RouteNameResolver` - - `Sylius\Bundle\ApiBundle\ApiPlatform\Factory\MergingExtractorResourceMetadataFactory` - `Sylius\Bundle\ApiBundle\ApiPlatform\Metadata\Merger\LegacyResourceMetadataMerger` - `Sylius\Bundle\ApiBundle\ApiPlatform\ResourceMetadataPropertyValueResolver` - `Sylius\Bundle\ApiBundle\Controller\GetAddressLogEntryCollectionAction` @@ -781,8 +809,6 @@ The old namespaces are deprecated and may be removed in future versions. Update - `Sylius\Bundle\ApiBundle\DataProvider\ShippingMethodsCollectionDataProvider` - `Sylius\Bundle\ApiBundle\DataProvider\VerifyCustomerAccountItemDataProvider` - `Sylius\Bundle\ApiBundle\DataTransformer\ChannelCodeAwareInputCommandDataTransformer` - - `Sylius\Bundle\ApiBundle\DataTransformer\CommandAwareInputDataTransformer` - - `Sylius\Bundle\ApiBundle\DataTransformer\CommandDataTransformerInterface` - `Sylius\Bundle\ApiBundle\DataTransformer\LocaleCodeAwareInputCommandDataTransformer` - `Sylius\Bundle\ApiBundle\DataTransformer\LoggedInCustomerEmailAwareCommandDataTransformer` - `Sylius\Bundle\ApiBundle\DataTransformer\LoggedInCustomerEmailIfNotSetAwareCommandDataTransformer` @@ -790,7 +816,6 @@ The old namespaces are deprecated and may be removed in future versions. Update - `Sylius\Bundle\ApiBundle\DataTransformer\OrderTokenValueAwareInputCommandDataTransformer` - `Sylius\Bundle\ApiBundle\DataTransformer\ShipmentIdAwareInputCommandDataTransformer` - `Sylius\Bundle\ApiBundle\DataTransformer\SubresourceIdAwareCommandDataTransformer` - - `Sylius\Bundle\ApiBundle\EventListener\PostgreSQLDriverExceptionListener` - `Sylius\Bundle\ApiBundle\Filter\Doctrine\PromotionCouponPromotionFilter` - `Sylius\Bundle\ApiBundle\Filter\PaymentMethodFilter` - `Sylius\Bundle\ApiBundle\Filter\ShippingMethodFilter` @@ -799,35 +824,34 @@ The old namespaces are deprecated and may be removed in future versions. Update - `Sylius\Bundle\ApiBundle\Serializer\FlattenExceptionNormalizer` - `Sylius\Bundle\ApiBundle\SerializerContextBuilder\ReadOperationContextBuilder` - `Sylius\Bundle\ApiBundle\Validator\Constraints\AccountVerificationTokenEligibilityValidator` - - `Sylius\Bundle\ApiBundle\Validator\ResourceApiInputDataPropertiesValidator` - `Sylius\Bundle\ApiBundle\Validator\ResourceInputDataPropertiesValidatorInterface` - - `api_platform.action.post_item` + - `sylius_api.extractor.property_info.empty_property_list` - **CoreBundle** - - `Sylius\Bundle\CoreBundle\Form\Extension\CountryTypeExtension` - - `Sylius\Bundle\CoreBundle\Form\Extension\CustomerTypeExtension` - - `Sylius\Bundle\CoreBundle\Form\Extension\LocaleTypeExtension` - - `Sylius\Bundle\CoreBundle\Form\Type\Grid\Filter\EntitiesFilterType` - - `Sylius\Component\Core\Grid\Filter\EntitiesFilter` - - `Sylius\Bundle\CoreBundle\Twig\FilterExtension` + - `sylius.form.extension.type.country` + - `sylius.form.extension.type.customer` + - `sylius.form.extension.type.locale` + - `sylius.grid_filter.entities` - **PayumBundle** - - `Sylius\Bundle\PayumBundle\Action\Paypal\ExpressCheckout\ConvertPaymentAction` - - `Sylius\Bundle\PayumBundle\Controller\PayumController` - - `Sylius\Bundle\PayumBundle\Form\Type\PaypalGatewayConfigurationType` - - `Sylius\Bundle\PayumBundle\Form\Type\StripeGatewayConfigurationType` - - `Sylius\Bundle\PayumBundle\Validator\Constraints\GatewayFactoryExists` + - `sylius.controller.payum` + - `sylius.form.type.gateway_configuration.paypal` + - `sylius.form.type.gateway_configuration.stripe` + - `sylius.form_registry.payum_gateway_config` + - `sylius.payum_action.paypal_express_checkout.convert_payment` - `Sylius\Bundle\PayumBundle\Validator\GatewayFactoryExistsValidator` - `Sylius\Bundle\PayumBundle\Validator\GroupsGenerator\GatewayConfigGroupsGenerator` - - `sylius.form_registry.payum_gateway_config` - **ProductBundle** + - `sylius.controller.product_slug` - `Sylius\Bundle\ProductBundle\Controller\ProductAttributeController` - - `Sylius\Bundle\ProductBundle\Controller\ProductSlugController` - **ShopBundle** - - `Sylius\Bundle\ShopBundle\Controller\HomepageController` - - `Sylius\Bundle\ShopBundle\Controller\SecurityWidgetController` + - `sylius.controller.shop.homepage` + - `sylius.controller.shop.security_widget` - **UiBundle** + - `sylius.twig.extension.form_test_attribute_array` + - `sylius.twig.extension.form_test_attribute_name` + - `sylius.twig.extension.sort_by` + - `sylius.twig.extension.template_event` - `Sylius\Bundle\UiBundle\Console\Command\DebugTemplateEventCommand` - `Sylius\Bundle\UiBundle\ContextProvider\ContextProviderInterface` - - `Sylius\Bundle\UiBundle\ContextProvider\DefaultContextProvider` - `Sylius\Bundle\UiBundle\DataCollector\TemplateBlockDataCollector` - `Sylius\Bundle\UiBundle\DataCollector\TemplateBlockRenderingHistory` - `Sylius\Bundle\UiBundle\DataCollector\TraceableTemplateBlockRenderer` @@ -835,19 +859,12 @@ The old namespaces are deprecated and may be removed in future versions. Update - `Sylius\Bundle\UiBundle\Registry\TemplateBlock` - `Sylius\Bundle\UiBundle\Registry\TemplateBlockRegistry` - `Sylius\Bundle\UiBundle\Registry\TemplateBlockRegistryInterface` - - `Sylius\Bundle\UiBundle\Renderer\DelegatingTemplateEventRenderer` - `Sylius\Bundle\UiBundle\Renderer\HtmlDebugTemplateBlockRenderer` - `Sylius\Bundle\UiBundle\Renderer\HtmlDebugTemplateEventRenderer` - `Sylius\Bundle\UiBundle\Renderer\TemplateBlockRendererInterface` - `Sylius\Bundle\UiBundle\Renderer\TemplateEventRendererInterface` - - `Sylius\Bundle\UiBundle\Renderer\TwigTemplateBlockRenderer` - `Sylius\Bundle\UiBundle\Storage\FilterStorage` - - `Sylius\Bundle\UiBundle\Storage\FilterStorageInterface` - `Sylius\Bundle\UiBundle\Twig\LegacySonataBlockExtension` - - `Sylius\Bundle\UiBundle\Twig\SortByExtension` - - `Sylius\Bundle\UiBundle\Twig\TemplateEventExtension` - - `Sylius\Bundle\UiBundle\Twig\TestFormAttributeExtension` - - `Sylius\Bundle\UiBundle\Twig\TestHtmlAttributeExtension` - **UserBundle** - `sylius.security.password_hasher` - `sylius.security.user_login` @@ -1032,10 +1049,6 @@ The old namespaces are deprecated and may be removed in future versions. Update * `sylius.{user_type}_user.pin_generator.password_reset` * `sylius.{user_type}_user.pin_uniqueness_checker.password_reset` -## Miscellaneous - -1. Starting with Sylius 1.14, 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\CatalogPromotionScopeType` and `Sylius\Bundle\AdminBundle\Form\Type\CatalogPromotionActionType` classes. - ### Testing Suite 1. The constructor signature of `Sylius\Component\Core\Test\Services\DefaultChannelFactory` has been changed: From f0035e385857dcb422f8f490d79dd2da6a978ed8 Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Mon, 11 Nov 2024 03:33:19 +0100 Subject: [PATCH 4/7] [API] Add missing services and classes deprecations --- .../Compiler/CommandDataTransformerPass.php | 6 ++++++ .../PropertyInfo/Extractor/EmptyPropertyListExtractor.php | 8 ++++++++ src/Sylius/Bundle/ApiBundle/Resources/config/services.xml | 5 ++++- .../ApiBundle/Resources/config/services/filters.xml | 3 +++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php b/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php index 8abca9c3ee..55b4f392e8 100644 --- a/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php +++ b/src/Sylius/Bundle/ApiBundle/DependencyInjection/Compiler/CommandDataTransformerPass.php @@ -37,6 +37,12 @@ final class CommandDataTransformerPass implements CompilerPassInterface $commandDataTransformersChainDefinition->addTag('api_platform.data_transformer'); + $commandDataTransformersChainDefinition->setDeprecated( + 'sylius/api-bundle', + '1.14', + 'The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.', + ); + $container->setDefinition( 'sylius.api.data_transformer.command_aware_input_data_transformer', $commandDataTransformersChainDefinition, diff --git a/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php b/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php index 55c25801ba..f8c1ad7e91 100644 --- a/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php +++ b/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php @@ -15,6 +15,14 @@ namespace Sylius\Bundle\ApiBundle\PropertyInfo\Extractor; use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; +trigger_deprecation( + 'sylius/api-bundle', + '1.14', + 'The "%s" class is deprecated and will be removed in Sylius 2.0.', + EmptyPropertyListExtractor::class, +); + +/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */ final class EmptyPropertyListExtractor implements PropertyListExtractorInterface { public function getProperties($class, array $context = []): ?array diff --git a/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml b/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml index de478d40aa..ba68491389 100644 --- a/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml +++ b/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml @@ -32,8 +32,11 @@ + The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0. + + + The "%alias_id%" service is deprecated since 1.14 and will be removed in 2.0. - diff --git a/src/Sylius/Bundle/ApiBundle/Resources/config/services/filters.xml b/src/Sylius/Bundle/ApiBundle/Resources/config/services/filters.xml index 9ae28c3f03..468526d540 100644 --- a/src/Sylius/Bundle/ApiBundle/Resources/config/services/filters.xml +++ b/src/Sylius/Bundle/ApiBundle/Resources/config/services/filters.xml @@ -60,6 +60,7 @@ + The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0. @@ -219,6 +220,7 @@ + The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0. @@ -343,6 +345,7 @@ + The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0. From 72728284375abef2b2f07481d57c62ba88116987 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 11 Nov 2024 12:21:21 +0100 Subject: [PATCH 5/7] Revert deprecating EmptyPropertyListExtractor --- UPGRADE-1.14.md | 1 + .../PropertyInfo/Extractor/EmptyPropertyListExtractor.php | 8 -------- src/Sylius/Bundle/ApiBundle/Resources/config/services.xml | 5 +---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/UPGRADE-1.14.md b/UPGRADE-1.14.md index 12cafb7d76..65b5e52153 100644 --- a/UPGRADE-1.14.md +++ b/UPGRADE-1.14.md @@ -188,6 +188,7 @@ The old namespaces are deprecated and may be removed in future versions. Update | `Sylius\Bundle\ApiBundle\Validator\Constraints\UniqueReviewerEmailValidator` | `sylius_api.validator.unique_reviewer_email` | | `Sylius\Bundle\ApiBundle\Validator\Constraints\AdminResetPasswordTokenNonExpiredValidator` | `sylius_api.validator.admin_reset_password_token_non_expired` | | `sylius.validator.order_address_requirement` | `sylius_api.validator.order_address_requirement` | + | `Sylius\Bundle\ApiBundle\PropertyInfo\Extractor\EmptyPropertyListExtractor` | `sylius_api.extractor.property_info.empty_property_list` | | `Sylius\Bundle\ApiBundle\SectionResolver\AdminApiUriBasedSectionResolver` | `sylius_api.section_resolver.admin_api_uri_based` | | `Sylius\Bundle\ApiBundle\SectionResolver\ShopApiUriBasedSectionResolver` | `sylius_api.section_resolver.shop_api_uri_based` | | `Sylius\Bundle\ApiBundle\EventListener\ApiCartBlamerListener` | `sylius_api.listener.api_cart_blamer` | diff --git a/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php b/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php index f8c1ad7e91..55c25801ba 100644 --- a/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php +++ b/src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/EmptyPropertyListExtractor.php @@ -15,14 +15,6 @@ namespace Sylius\Bundle\ApiBundle\PropertyInfo\Extractor; use Symfony\Component\PropertyInfo\PropertyListExtractorInterface; -trigger_deprecation( - 'sylius/api-bundle', - '1.14', - 'The "%s" class is deprecated and will be removed in Sylius 2.0.', - EmptyPropertyListExtractor::class, -); - -/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */ final class EmptyPropertyListExtractor implements PropertyListExtractorInterface { public function getProperties($class, array $context = []): ?array diff --git a/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml b/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml index ba68491389..de478d40aa 100644 --- a/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml +++ b/src/Sylius/Bundle/ApiBundle/Resources/config/services.xml @@ -32,11 +32,8 @@ - The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0. - - - The "%alias_id%" service is deprecated since 1.14 and will be removed in 2.0. + From 2cd3caed5c742785290a363fc1ccaa05faaf3bd7 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 11 Nov 2024 12:21:51 +0100 Subject: [PATCH 6/7] Remove UPGRADE-2.0 file from 1.14 branch --- UPGRADE-2.0.md | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 UPGRADE-2.0.md diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md deleted file mode 100644 index f60d67c676..0000000000 --- a/UPGRADE-2.0.md +++ /dev/null @@ -1,49 +0,0 @@ -# UPGRADE FROM `v1.X.X` TO `v2.0.0` - -1. Non-prefix serialization groups in Sylius resources have been removed. - If you have extended any of them, you must prefix them with `sylius:`, for example: - - ```diff - - #[Groups(['admin:product:index'])] - + #[Groups(['sylius:admin:product:index'])] - ``` - -## Codebase - -* Doctrine MongoDB and PHPCR is not longer supported in ResourceBundle and GridBundle: - - * The following classes were removed: - - * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\DataSource` - * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\Driver` - * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionBuilder` - * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionBuilderInterface` - * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionVisitor` - * `Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExtraComparison` - * `Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\Doctrine\DoctrineODMDriver` - * `Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\Doctrine\DoctrinePHPCRDriver` - * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB\DocumentRepository` - * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB\TranslatableRepository` - * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\DefaultParentListener` - * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\NameFilterListener` - * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener\NameResolverListener` - * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\Form\Builder\DefaultFormBuilder` - * `Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\DocumentRepository` - * `Sylius\Bundle\ResourceBundle\EventListener\ODMMappedSuperClassSubscriber` - * `Sylius\Bundle\ResourceBundle\EventListener\ODMRepositoryClassSubscriber` - * `Sylius\Bundle\ResourceBundle\EventListener\ODMTranslatableListener` - - * The following services were removed: - - * `sylius.event_subscriber.odm_mapped_super_class` - * `sylius.event_subscriber.odm_repository_class` - * `sylius.grid_driver.doctrine.phpcrodm` - - * The following parameters were removed: - - * `sylius.mongodb_odm.repository.class` - * `sylius.phpcr_odm.repository.class` - - * The following configuration options were removed: - - * `sylius.mailer.templates` From 58807a262b14ea1682750a66a09a60384cafb822 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 11 Nov 2024 12:33:24 +0100 Subject: [PATCH 7/7] Minor reorganization of UPGRADE-1.14 file --- UPGRADE-1.14.md | 136 ++++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/UPGRADE-1.14.md b/UPGRADE-1.14.md index 65b5e52153..db5a2ca7c9 100644 --- a/UPGRADE-1.14.md +++ b/UPGRADE-1.14.md @@ -43,6 +43,26 @@ The old namespaces are deprecated and may be removed in future versions. Update allowed_image_mime_types: ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/svg+xml'] ``` +## Configuration + +1. The `sylius_core.state_machine` configuration parameter is deprecated and will be removed in 2.0. + Use `sylius_state_machine_abstraction.state_machine` instead. + +1. The `sylius_core.autoconfigure_with_attributes` and `sylius_order.autoconfigure_with_attributes` configuration parameters + are deprecated and will be removed in 2.0. To autoconfigure order processors and cart contexts, use corresponding attributes + instead of interfaces: + + - `Sylius\Bundle\OrderBundle\Attribute\AsCartContext` + - `Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor` + +1. The `sylius_user.resources.{name}.user.resetting.pin` configuration parameter is deprecated and will be removed in 2.0. + The corresponding email `reset_password_pin` and `Sylius\Bundle\UserBundle\Controller\UserController::requestPasswordResetPinAction` + method have been also deprecated and will be removed in 2.0. The related class `Sylius\Component\User\Security\Generator\UniquePinGenerator` + and services have been deprecated as well: + + * `sylius.{user_type}_user.pin_generator.password_reset` + * `sylius.{user_type}_user.pin_uniqueness_checker.password_reset` + ## New Service Aliases 1. Aliases for the following services have been introduced to standardize service IDs and will replace the incorrect IDs in Sylius 2.0: @@ -870,6 +890,54 @@ The old namespaces are deprecated and may be removed in future versions. Update - `sylius.security.password_hasher` - `sylius.security.user_login` +## Routes deprecations + - `sylius_admin_ajax_all_product_variants_by_codes` + - `sylius_admin_ajax_all_product_variants_by_phrase` + - `sylius_admin_ajax_customer_group_by_code` + - `sylius_admin_ajax_customer_groups_by_phrase` + - `sylius_admin_ajax_find_product_options` + - `sylius_admin_ajax_generate_product_slug` + - `sylius_admin_ajax_generate_taxon_slug` + - `sylius_admin_ajax_product_by_code` + - `sylius_admin_ajax_product_by_name_phrase` + - `sylius_admin_ajax_product_index` + - `sylius_admin_ajax_product_options_by_phrase` + - `sylius_admin_ajax_product_variants_by_codes` + - `sylius_admin_ajax_product_variants_by_phrase` + - `sylius_admin_ajax_products_by_phrase` + - `sylius_admin_ajax_taxon_by_code` + - `sylius_admin_ajax_taxon_by_name_phrase` + - `sylius_admin_ajax_taxon_leafs` + - `sylius_admin_ajax_taxon_root_nodes` + - `sylius_admin_dashboard_statistics` + - `sylius_admin_get_attribute_types` + - `sylius_admin_get_payment_gateways` + - `sylius_admin_get_product_attributes` + - `sylius_admin_partial_address_log_entry_index` + - `sylius_admin_partial_catalog_promotion_show` + - `sylius_admin_partial_channel_index` + - `sylius_admin_partial_customer_latest` + - `sylius_admin_partial_customer_show` + - `sylius_admin_partial_order_latest` + - `sylius_admin_partial_order_latest_in_channel` + - `sylius_admin_partial_product_show` + - `sylius_admin_partial_promotion_show` + - `sylius_admin_partial_taxon_show` + - `sylius_admin_partial_taxon_tree` + - `sylius_admin_render_attribute_forms` + - `sylius_shop_ajax_cart_add_item` + - `sylius_shop_ajax_cart_item_remove` + - `sylius_shop_ajax_user_check_action` + - `sylius_shop_partial_cart_summary` + - `sylius_shop_partial_cart_add_item` + - `sylius_shop_partial_channel_menu_taxon_index` + - `sylius_shop_partial_product_association_show` + - `sylius_shop_partial_product_index_latest` + - `sylius_shop_partial_product_review_latest` + - `sylius_shop_partial_product_show_by_slug` + - `sylius_shop_partial_taxon_index_by_code` + - `sylius_shop_partial_taxon_show_by_slug` + ## Constructor Signature Changes 1. The following constructor signatures have been changed: @@ -982,74 +1050,6 @@ The old namespaces are deprecated and may be removed in future versions. Update ) ``` -## Routes deprecations - - `sylius_admin_ajax_all_product_variants_by_codes` - - `sylius_admin_ajax_all_product_variants_by_phrase` - - `sylius_admin_ajax_customer_group_by_code` - - `sylius_admin_ajax_customer_groups_by_phrase` - - `sylius_admin_ajax_find_product_options` - - `sylius_admin_ajax_generate_product_slug` - - `sylius_admin_ajax_generate_taxon_slug` - - `sylius_admin_ajax_product_by_code` - - `sylius_admin_ajax_product_by_name_phrase` - - `sylius_admin_ajax_product_index` - - `sylius_admin_ajax_product_options_by_phrase` - - `sylius_admin_ajax_product_variants_by_codes` - - `sylius_admin_ajax_product_variants_by_phrase` - - `sylius_admin_ajax_products_by_phrase` - - `sylius_admin_ajax_taxon_by_code` - - `sylius_admin_ajax_taxon_by_name_phrase` - - `sylius_admin_ajax_taxon_leafs` - - `sylius_admin_ajax_taxon_root_nodes` - - `sylius_admin_dashboard_statistics` - - `sylius_admin_get_attribute_types` - - `sylius_admin_get_payment_gateways` - - `sylius_admin_get_product_attributes` - - `sylius_admin_partial_address_log_entry_index` - - `sylius_admin_partial_catalog_promotion_show` - - `sylius_admin_partial_channel_index` - - `sylius_admin_partial_customer_latest` - - `sylius_admin_partial_customer_show` - - `sylius_admin_partial_order_latest` - - `sylius_admin_partial_order_latest_in_channel` - - `sylius_admin_partial_product_show` - - `sylius_admin_partial_promotion_show` - - `sylius_admin_partial_taxon_show` - - `sylius_admin_partial_taxon_tree` - - `sylius_admin_render_attribute_forms` - - `sylius_shop_ajax_cart_add_item` - - `sylius_shop_ajax_cart_item_remove` - - `sylius_shop_ajax_user_check_action` - - `sylius_shop_partial_cart_summary` - - `sylius_shop_partial_cart_add_item` - - `sylius_shop_partial_channel_menu_taxon_index` - - `sylius_shop_partial_product_association_show` - - `sylius_shop_partial_product_index_latest` - - `sylius_shop_partial_product_review_latest` - - `sylius_shop_partial_product_show_by_slug` - - `sylius_shop_partial_taxon_index_by_code` - - `sylius_shop_partial_taxon_show_by_slug` - -## Configuration - -1. The `sylius_core.state_machine` configuration parameter is deprecated and will be removed in 2.0. - Use `sylius_state_machine_abstraction.state_machine` instead. - -1. The `sylius_core.autoconfigure_with_attributes` and `sylius_order.autoconfigure_with_attributes` configuration parameters - are deprecated and will be removed in 2.0. To autoconfigure order processors and cart contexts, use corresponding attributes - instead of interfaces: - - - `Sylius\Bundle\OrderBundle\Attribute\AsCartContext` - - `Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor` - -1. The `sylius_user.resources.{name}.user.resetting.pin` configuration parameter is deprecated and will be removed in 2.0. - The corresponding email `reset_password_pin` and `Sylius\Bundle\UserBundle\Controller\UserController::requestPasswordResetPinAction` - method have been also deprecated and will be removed in 2.0. The related class `Sylius\Component\User\Security\Generator\UniquePinGenerator` - and services have been deprecated as well: - - * `sylius.{user_type}_user.pin_generator.password_reset` - * `sylius.{user_type}_user.pin_uniqueness_checker.password_reset` - ### Testing Suite 1. The constructor signature of `Sylius\Component\Core\Test\Services\DefaultChannelFactory` has been changed: