From d627e1c92913f5174357f81665f4decfb7d6703b Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Thu, 13 Oct 2022 23:35:34 +0200 Subject: [PATCH] [Notifier] Add from in SmsMessage and support it in bridge transports --- notifier/texters.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/notifier/texters.rst b/notifier/texters.rst index 6e1590ef90c..0ba164a3789 100644 --- a/notifier/texters.rst +++ b/notifier/texters.rst @@ -23,7 +23,9 @@ you to send SMS messages:: // the phone number to send the SMS message to '+1411111111', // the message - 'A new login was detected!' + 'A new login was detected!', + // optionally, you can override default "from" defined in transports + '+1422222222', ); $sentMessage = $texter->send($sms); @@ -32,6 +34,10 @@ you to send SMS messages:: } } +.. versionadded:: 6.2 + + The 3rd argument of ``SmsMessage`` (``$from``) was introduced in Symfony 6.2. + The ``send()`` method returns a variable of type :class:`Symfony\\Component\\Notifier\\Message\\SentMessage` which provides information such as the message ID and the original message contents.