From 583d0cc17269965a7fff41d0dfe29eeaa8242505 Mon Sep 17 00:00:00 2001 From: h2entwicklung Date: Tue, 5 Nov 2024 08:49:36 +0100 Subject: [PATCH] * fix new message implemention need as Message handler annotaion --- src/MessageHandler/CustomMailerMessageDispatcher.php | 5 +++-- src/MessageHandler/LobbyLeaverMessageDispatcher.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/MessageHandler/CustomMailerMessageDispatcher.php b/src/MessageHandler/CustomMailerMessageDispatcher.php index b0fdced0b..68607be28 100644 --- a/src/MessageHandler/CustomMailerMessageDispatcher.php +++ b/src/MessageHandler/CustomMailerMessageDispatcher.php @@ -9,11 +9,12 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Mailer\MailerInterface; use Symfony\Component\Mailer\Transport; -use Symfony\Component\Messenger\Handler\MessageHandlerInterface; +use Symfony\Component\Messenger\Attribute\AsMessageHandler; use Symfony\Component\Mime\Address; use Symfony\Component\Mime\Email; -class CustomMailerMessageDispatcher implements MessageHandlerInterface +#[AsMessageHandler] +class CustomMailerMessageDispatcher { public function __construct( private MailerInterface $mailer, diff --git a/src/MessageHandler/LobbyLeaverMessageDispatcher.php b/src/MessageHandler/LobbyLeaverMessageDispatcher.php index 16f5d3879..e33295142 100644 --- a/src/MessageHandler/LobbyLeaverMessageDispatcher.php +++ b/src/MessageHandler/LobbyLeaverMessageDispatcher.php @@ -7,9 +7,10 @@ use App\Service\Lobby\ToModeratorWebsocketService; use Doctrine\ORM\EntityManagerInterface; use Psr\Log\LoggerInterface; -use Symfony\Component\Messenger\Handler\MessageHandlerInterface; +use Symfony\Component\Messenger\Attribute\AsMessageHandler; -class LobbyLeaverMessageDispatcher implements MessageHandlerInterface +#[AsMessageHandler] +class LobbyLeaverMessageDispatcher { private LoggerInterface $logger; private $toModerator;