File tree 2 files changed +2
-5
lines changed
2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 10
10
/**
11
11
* This is the message you should dispatch when you want to update catalog promotions
12
12
*/
13
- final class StartCatalogPromotionUpdate
13
+ final class StartCatalogPromotionUpdate implements AsyncCommandInterface
14
14
{
15
15
/**
16
16
* A list of catalog promotion codes to process. If empty, all catalog promotions will be processed
Original file line number Diff line number Diff line change 9
9
use Setono \SyliusCatalogPromotionPlugin \Factory \CatalogPromotionUpdateFactoryInterface ;
10
10
use Setono \SyliusCatalogPromotionPlugin \Message \Command \ProcessCatalogPromotionUpdate ;
11
11
use Setono \SyliusCatalogPromotionPlugin \Message \Command \StartCatalogPromotionUpdate ;
12
- use Setono \SyliusCatalogPromotionPlugin \Model \CatalogPromotionUpdateInterface ;
13
12
use Setono \SyliusCatalogPromotionPlugin \Repository \CatalogPromotionRepositoryInterface ;
14
13
use Symfony \Component \Messenger \MessageBusInterface ;
15
14
@@ -26,7 +25,7 @@ public function __construct(
26
25
$ this ->managerRegistry = $ managerRegistry ;
27
26
}
28
27
29
- public function __invoke (StartCatalogPromotionUpdate $ message ): CatalogPromotionUpdateInterface
28
+ public function __invoke (StartCatalogPromotionUpdate $ message ): void
30
29
{
31
30
$ catalogPromotionUpdate = $ this ->catalogPromotionUpdateFactory ->createFromMessage ($ message );
32
31
@@ -35,7 +34,5 @@ public function __invoke(StartCatalogPromotionUpdate $message): CatalogPromotion
35
34
$ manager ->flush ();
36
35
37
36
$ this ->commandBus ->dispatch (new ProcessCatalogPromotionUpdate ($ catalogPromotionUpdate ));
38
-
39
- return $ catalogPromotionUpdate ;
40
37
}
41
38
}
You can’t perform that action at this time.
0 commit comments