[Notifier] Return SentMessage from the Notifier message handler
This commit is contained in:
parent
ce8f8a5f18
commit
5855d112b7
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\Notifier\Messenger;
|
||||
|
||||
use Symfony\Component\Notifier\Message\MessageInterface;
|
||||
use Symfony\Component\Notifier\Message\SentMessage;
|
||||
use Symfony\Component\Notifier\Transport\TransportInterface;
|
||||
|
||||
/**
|
||||
@ -28,8 +29,8 @@ final class MessageHandler
|
||||
$this->transport = $transport;
|
||||
}
|
||||
|
||||
public function __invoke(MessageInterface $message)
|
||||
public function __invoke(MessageInterface $message): ?SentMessage
|
||||
{
|
||||
$this->transport->send($message);
|
||||
return $this->transport->send($message);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user