Skip to content

Commit 768e34c

Browse files
committed
[Notifier] Return SentMessage from the Notifier message handler
1 parent 6c0b119 commit 768e34c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Messenger/MessageHandler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Notifier\Messenger;
1313

1414
use Symfony\Component\Notifier\Message\MessageInterface;
15+
use Symfony\Component\Notifier\Message\SentMessage;
1516
use Symfony\Component\Notifier\Transport\TransportInterface;
1617

1718
/**
@@ -28,8 +29,8 @@ public function __construct(TransportInterface $transport)
2829
$this->transport = $transport;
2930
}
3031

31-
public function __invoke(MessageInterface $message)
32+
public function __invoke(MessageInterface $message): ?SentMessage
3233
{
33-
$this->transport->send($message);
34+
return $this->transport->send($message);
3435
}
3536
}

0 commit comments

Comments
 (0)