feature #37403 [Notifier] Return SentMessage from the Notifier message handler (fabpot)
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Return SentMessage from the Notifier message handler
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | see https://github.com/symfony/symfony/pull/36611#issuecomment-648448026 <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR |
Commits
-------
5855d112b7
[Notifier] Return SentMessage from the Notifier message handler
This commit is contained in:
commit
3308b25fe4
@ -12,6 +12,7 @@
|
|||||||
namespace Symfony\Component\Notifier\Messenger;
|
namespace Symfony\Component\Notifier\Messenger;
|
||||||
|
|
||||||
use Symfony\Component\Notifier\Message\MessageInterface;
|
use Symfony\Component\Notifier\Message\MessageInterface;
|
||||||
|
use Symfony\Component\Notifier\Message\SentMessage;
|
||||||
use Symfony\Component\Notifier\Transport\TransportInterface;
|
use Symfony\Component\Notifier\Transport\TransportInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,8 +29,8 @@ final class MessageHandler
|
|||||||
$this->transport = $transport;
|
$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