File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed
src/Symfony/Component/Notifier Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ CHANGELOG
445.2.0
55-----
66
7- * [ BC BREAK] The ` TransportInterface::send() ` and ` AbstractTransport::doSend() ` methods changed to return a ` SentMessage ` instance instead of ` void ` .
7+ * [ BC BREAK] The ` TransportInterface::send() ` and ` AbstractTransport::doSend() ` methods changed to return a ` ? SentMessage` instance instead of ` void ` .
88
995.1.0
1010-----
Original file line number Diff line number Diff line change @@ -48,16 +48,20 @@ public function supports(MessageInterface $message): bool
4848 return $ this ->transport ->supports ($ message );
4949 }
5050
51- public function send (MessageInterface $ message ): SentMessage
51+ public function send (MessageInterface $ message ): ? SentMessage
5252 {
5353 if (null === $ this ->bus ) {
54- return $ this ->transport ->send ($ message );
54+ $ this ->transport ->send ($ message );
55+
56+ return null ;
5557 }
5658
5759 if (null !== $ this ->dispatcher ) {
5860 $ this ->dispatcher ->dispatch (new MessageEvent ($ message , true ));
5961 }
6062
6163 $ this ->bus ->dispatch ($ message );
64+
65+ return null ;
6266 }
6367}
Original file line number Diff line number Diff line change @@ -48,16 +48,20 @@ public function supports(MessageInterface $message): bool
4848 return $ this ->transport ->supports ($ message );
4949 }
5050
51- public function send (MessageInterface $ message ): SentMessage
51+ public function send (MessageInterface $ message ): ? SentMessage
5252 {
5353 if (null === $ this ->bus ) {
54- return $ this ->transport ->send ($ message );
54+ $ this ->transport ->send ($ message );
55+
56+ return null ;
5557 }
5658
5759 if (null !== $ this ->dispatcher ) {
5860 $ this ->dispatcher ->dispatch (new MessageEvent ($ message , true ));
5961 }
6062
6163 $ this ->bus ->dispatch ($ message );
64+
65+ return null ;
6266 }
6367}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ interface TransportInterface
2525 /**
2626 * @throws TransportExceptionInterface
2727 */
28- public function send (MessageInterface $ message ): SentMessage ;
28+ public function send (MessageInterface $ message ): ? SentMessage ;
2929
3030 public function supports (MessageInterface $ message ): bool ;
3131
You can’t perform that action at this time.
0 commit comments