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

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