Typo3UpdateCommandHandler.php 584 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Message\Handler\Typo3;
  3. use App\Message\Command\Typo3\Typo3UpdateCommand;
  4. use App\Service\Typo3\Typo3Service;
  5. use Symfony\Component\Messenger\Attribute\AsMessageHandler;
  6. #[AsMessageHandler(priority: 1)]
  7. class Typo3UpdateCommandHandler
  8. {
  9. public function __construct(
  10. private Typo3Service $typo3Service
  11. ) {}
  12. /**
  13. * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface
  14. */
  15. public function __invoke(Typo3UpdateCommand $command) {
  16. $this->typo3Service->updateSite($command->getOrganizationId());
  17. }
  18. }