vendor/shopware/core/Framework/MessageQueue/ScheduledTask/Subscriber/UpdatePostFinishSubscriber.php line 32

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\MessageQueue\ScheduledTask\Subscriber;
  3. use Shopware\Core\Framework\MessageQueue\ScheduledTask\Registry\TaskRegistry;
  4. use Shopware\Core\Framework\Update\Event\UpdatePostFinishEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. /**
  7.  * @deprecated tag:v6.5.0 - reason:becomes-internal - EventSubscribers will become internal in v6.5.0
  8.  */
  9. class UpdatePostFinishSubscriber implements EventSubscriberInterface
  10. {
  11.     private TaskRegistry $registry;
  12.     /**
  13.      * @internal
  14.      */
  15.     public function __construct(TaskRegistry $taskRegistry)
  16.     {
  17.         $this->registry $taskRegistry;
  18.     }
  19.     /**
  20.      * @return array<string, string|array{0: string, 1: int}|list<array{0: string, 1?: int}>>
  21.      */
  22.     public static function getSubscribedEvents(): array
  23.     {
  24.         return [UpdatePostFinishEvent::class => 'updatePostFinishEvent'];
  25.     }
  26.     public function updatePostFinishEvent(): void
  27.     {
  28.         $this->registry->registerTasks();
  29.     }
  30. }