Skip to content

Commit 12c71a6

Browse files
committed
Tweaks
1 parent 8fd743c commit 12c71a6

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

notifier.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ To send a notification, autowire the
376376
);
377377

378378
// Send the notification to the recipient
379-
$notifier->send($notification, $recipient);
379+
$sentMessage = $notifier->send($notification, $recipient);
380380

381381
// ...
382382
}
@@ -387,6 +387,14 @@ channels. The channels specify which channel (or transport) should be used
387387
to send the notification. For instance, ``['email', 'sms']`` will send
388388
both an email and sms notification to the user.
389389

390+
The ``send()`` method used to send the notification returns a variable of type
391+
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage` which provides
392+
information such as the message ID and the original message contents.
393+
394+
.. versionadded:: 5.2
395+
396+
The ``SentMessage`` class was introduced in Symfony 5.2.
397+
390398
The default notification also has a ``content()`` and ``emoji()`` method to
391399
set the notification content and icon.
392400

notifier/chatters.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ you to send messages to chat services like Slack or Telegram::
3838
}
3939
}
4040

41-
The ``$sentMessage`` (instance of
42-
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage`) returned by
43-
``send()`` contains info about the sent message.
41+
The ``send()`` method returns a variable of type
42+
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage` which provides
43+
information such as the message ID and the original message contents.
44+
45+
.. versionadded:: 5.2
46+
47+
The ``SentMessage`` class was introduced in Symfony 5.2.
4448

4549
.. seealso::
4650

notifier/texters.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ you to send SMS messages::
3939
}
4040
}
4141

42-
The ``$sentMessage`` (instance of
43-
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage`) returned by
44-
``send()`` contains info about the sent message.
42+
The ``send()`` method returns a variable of type
43+
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage` which provides
44+
information such as the message ID and the original message contents.
45+
46+
.. versionadded:: 5.2
47+
48+
The ``SentMessage`` class was introduced in Symfony 5.2.
4549

4650
.. seealso::
4751

0 commit comments

Comments
 (0)