Skip to content

Commit 3308b25

Browse files
committed
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 #36611 (comment) <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | Commits ------- 5855d11 [Notifier] Return SentMessage from the Notifier message handler
2 parents 08f47a1 + 5855d11 commit 3308b25

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Component/Notifier/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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy