From 19f97c6bf479047d838eb52909b752218164a0d8 Mon Sep 17 00:00:00 2001 From: Wojdylak Date: Wed, 17 Jan 2024 15:55:51 +0100 Subject: [PATCH] Update upgrade file --- UPGRADE-1.13.md | 27 +++++++++++++++++++ .../Command/ShowAvailablePluginsCommand.php | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/UPGRADE-1.13.md b/UPGRADE-1.13.md index 92e83d6f38e1..072da6da0de9 100644 --- a/UPGRADE-1.13.md +++ b/UPGRADE-1.13.md @@ -336,3 +336,30 @@ + private RepositoryInterface|ZoneRepositoryInterface $zoneRepository, ) ``` + +1. Moved classes from `Command` to `Console\Command`. The `Command` namespace is deprecated for console command classes and will be removed in Sylius 2.0. +List of affected classes: + - `\Sylius\Bundle\OrderBundle\Command\RemoveExpiredCartsCommand` to `\Sylius\Bundle\OrderBundle\Console\Command\RemoveExpiredCartsCommand` + - `\Sylius\Bundle\PromotionBundle\Command\GenerateCouponsCommand` to `\Sylius\Bundle\PromotionBundle\Console\Command\GenerateCouponsCommand` + - `\Sylius\Bundle\UiBundle\Command\DebugTemplateEventCommand` to `\Sylius\Bundle\UiBundle\Console\Command\DebugTemplateEventCommand` + - `\Sylius\Bundle\UserBundle\Command\AbstractRoleCommand` to `\Sylius\Bundle\UserBundle\Console\Command\AbstractRoleCommand` + - `\Sylius\Bundle\UserBundle\Command\DemoteUserCommand` to `\Sylius\Bundle\UserBundle\Console\Command\DemoteUserCommand` + - `\Sylius\Bundle\UserBundle\Command\PromoteUserCommand` to `\Sylius\Bundle\UserBundle\Console\Command\PromoteUserCommand` + - `\Sylius\Bundle\CoreBundle\Command\Model\PluginInfo` to `\Sylius\Bundle\CoreBundle\Console\Command\Model\PluginInfo` + - `\Sylius\Bundle\CoreBundle\Command\AbstractInstallCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\AbstractInstallCommand` + - `\Sylius\Bundle\CoreBundle\Command\CancelUnpaidOrdersCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\CancelUnpaidOrdersCommand` + - `\Sylius\Bundle\CoreBundle\Command\CheckRequirementsCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\CheckRequirementsCommand` + - `\Sylius\Bundle\CoreBundle\Command\InformAboutGUSCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\InformAboutGUSCommand` + - `\Sylius\Bundle\CoreBundle\Command\InstallAssetsCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\InstallAssetsCommand` + - `\Sylius\Bundle\CoreBundle\Command\InstallCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\InstallCommand` + - `\Sylius\Bundle\CoreBundle\Command\InstallDatabaseCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\InstallDatabaseCommand` + - `\Sylius\Bundle\CoreBundle\Command\InstallSampleDataCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\InstallSampleDataCommand` + - `\Sylius\Bundle\CoreBundle\Command\JwtConfigurationCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\JwtConfigurationCommand` + - `\Sylius\Bundle\CoreBundle\Command\SetupCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\SetupCommand` + - `\Sylius\Bundle\CoreBundle\Command\ShowAvailablePluginsCommand` to `\Sylius\Bundle\CoreBundle\Console\Command\ShowAvailablePluginsCommand` + +1. In version 2.0 introduces a significant restructuring of our class system to enhance efficiency and clarity. The changes are as follows: + - `Message` will be migrated to `Command`. + - `MessageDispatcher` will be migrated to `CommandDispatcher`. + - `MessageHandler` will be migrated to `CommandHandler`. + - Example: Within the `Sylius\Bundle\CoreBundle`, the `MessageHandler\OrderHandler` class will be migrated to `CommandHandler\OrderHandler`. This pattern will be mirrored across other bundles in the system. diff --git a/src/Sylius/Bundle/CoreBundle/Console/Command/ShowAvailablePluginsCommand.php b/src/Sylius/Bundle/CoreBundle/Console/Command/ShowAvailablePluginsCommand.php index a84f8cdff783..d1841cc466a8 100644 --- a/src/Sylius/Bundle/CoreBundle/Console/Command/ShowAvailablePluginsCommand.php +++ b/src/Sylius/Bundle/CoreBundle/Console/Command/ShowAvailablePluginsCommand.php @@ -15,7 +15,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -use Sylius\Bundle\CoreBundle\Command\Model\PluginInfo; +use Sylius\Bundle\CoreBundle\Console\Command\Model\PluginInfo; use Sylius\Bundle\CoreBundle\Installer\Renderer\TableRenderer; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface;