Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7b20f3

Browse files
authored
refactor #13479 [CatalogPromotion] Refactor names of listeners to be consistent with others (GSadee)
This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | 1.11 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | | License | MIT <!-- - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- ee50639 [CatalogPromotion] Refactor names of listeners to be consistent with others
2 parents a3d7b2e + ee50639 commit a7b20f3

7 files changed

Lines changed: 9 additions & 11 deletions

File tree

src/Sylius/Bundle/CoreBundle/Listener/CatalogPromotionUpdateListener.php renamed to src/Sylius/Bundle/CoreBundle/Listener/CatalogPromotionUpdatedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Sylius\Component\Promotion\Event\CatalogPromotionUpdated;
1919
use Sylius\Component\Resource\Repository\RepositoryInterface;
2020

21-
final class CatalogPromotionUpdateListener
21+
final class CatalogPromotionUpdatedListener
2222
{
2323
private AllCatalogPromotionsProcessorInterface $catalogPromotionsProcessor;
2424

src/Sylius/Bundle/CoreBundle/Listener/ProductUpdateListener.php renamed to src/Sylius/Bundle/CoreBundle/Listener/ProductUpdatedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Sylius\Component\Core\Model\ProductInterface;
2020
use Sylius\Component\Core\Repository\ProductRepositoryInterface;
2121

22-
final class ProductUpdateListener
22+
final class ProductUpdatedListener
2323
{
2424
private ProductRepositoryInterface $productRepository;
2525

src/Sylius/Bundle/CoreBundle/Listener/ProductVariantUpdateListener.php renamed to src/Sylius/Bundle/CoreBundle/Listener/ProductVariantUpdatedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Sylius\Component\Core\Model\ProductVariantInterface;
2020
use Sylius\Component\Core\Repository\ProductVariantRepositoryInterface;
2121

22-
final class ProductVariantUpdateListener
22+
final class ProductVariantUpdatedListener
2323
{
2424
private ProductVariantRepositoryInterface $productVariantRepository;
2525

src/Sylius/Bundle/CoreBundle/Resources/config/services/listeners.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<tag name="messenger.message_handler" bus="sylius.event_bus" />
117117
</service>
118118

119-
<service id="Sylius\Bundle\CoreBundle\Listener\CatalogPromotionUpdateListener">
119+
<service id="Sylius\Bundle\CoreBundle\Listener\CatalogPromotionUpdatedListener">
120120
<argument type="service" id="Sylius\Bundle\CoreBundle\Processor\AllCatalogPromotionsProcessorInterface" />
121121
<argument type="service" id="sylius.repository.catalog_promotion" />
122122
<argument type="service" id="doctrine.orm.entity_manager" />
@@ -139,14 +139,14 @@
139139
<tag name="messenger.message_handler" bus="sylius.event_bus" />
140140
</service>
141141

142-
<service id="Sylius\Bundle\CoreBundle\Listener\ProductUpdateListener">
142+
<service id="Sylius\Bundle\CoreBundle\Listener\ProductUpdatedListener">
143143
<argument type="service" id="sylius.repository.product" />
144144
<argument type="service" id="Sylius\Bundle\CoreBundle\Processor\ProductCatalogPromotionsProcessorInterface" />
145145
<argument type="service" id="doctrine.orm.entity_manager" />
146146
<tag name="messenger.message_handler" bus="sylius.event_bus" />
147147
</service>
148148

149-
<service id="Sylius\Bundle\CoreBundle\Listener\ProductVariantUpdateListener">
149+
<service id="Sylius\Bundle\CoreBundle\Listener\ProductVariantUpdatedListener">
150150
<argument type="service" id="sylius.repository.product_variant" />
151151
<argument type="service" id="Sylius\Bundle\CoreBundle\Processor\ProductVariantCatalogPromotionsProcessorInterface" />
152152
<argument type="service" id="doctrine.orm.entity_manager" />

src/Sylius/Bundle/CoreBundle/spec/Listener/CatalogPromotionUpdateListenerSpec.php renamed to src/Sylius/Bundle/CoreBundle/spec/Listener/CatalogPromotionUpdatedListenerSpec.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
use Doctrine\ORM\EntityManagerInterface;
1717
use PhpSpec\ObjectBehavior;
1818
use SM\Factory\FactoryInterface;
19-
use SM\StateMachine\StateMachineInterface;
2019
use Sylius\Bundle\CoreBundle\Processor\AllCatalogPromotionsProcessorInterface;
2120
use Sylius\Component\Core\Model\CatalogPromotionInterface;
2221
use Sylius\Component\Promotion\Event\CatalogPromotionUpdated;
23-
use Sylius\Component\Promotion\Model\CatalogPromotionTransitions;
2422
use Sylius\Component\Resource\Repository\RepositoryInterface;
2523

26-
final class CatalogPromotionUpdateListenerSpec extends ObjectBehavior
24+
final class CatalogPromotionUpdatedListenerSpec extends ObjectBehavior
2725
{
2826
function let(
2927
AllCatalogPromotionsProcessorInterface $catalogPromotionReprocessor,

src/Sylius/Bundle/CoreBundle/spec/Listener/ProductUpdateListenerSpec.php renamed to src/Sylius/Bundle/CoreBundle/spec/Listener/ProductUpdatedListenerSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Sylius\Component\Core\Model\ProductInterface;
2222
use Sylius\Component\Core\Repository\ProductRepositoryInterface;
2323

24-
final class ProductUpdateListenerSpec extends ObjectBehavior
24+
final class ProductUpdatedListenerSpec extends ObjectBehavior
2525
{
2626
function let(
2727
ProductRepositoryInterface $productRepository,

src/Sylius/Bundle/CoreBundle/spec/Listener/ProductVariantUpdateListenerSpec.php renamed to src/Sylius/Bundle/CoreBundle/spec/Listener/ProductVariantUpdatedListenerSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Sylius\Component\Core\Model\ProductVariantInterface;
2222
use Sylius\Component\Core\Repository\ProductVariantRepositoryInterface;
2323

24-
final class ProductVariantUpdateListenerSpec extends ObjectBehavior
24+
final class ProductVariantUpdatedListenerSpec extends ObjectBehavior
2525
{
2626
function let(
2727
ProductVariantRepositoryInterface $productVariantRepository,

0 commit comments

Comments
 (0)