From ebde5a8afbd256e44dd509b578e75d36d517aa86 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Mon, 6 Feb 2023 19:47:39 +0100 Subject: [PATCH] [Messenger] Add `TransportNamesStamp` tip --- messenger.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/messenger.rst b/messenger.rst index 40b6e714a19..67fccfa9bf4 100644 --- a/messenger.rst +++ b/messenger.rst @@ -339,6 +339,20 @@ to multiple transports: from ``Notification``, both the routing for ``Notification`` and ``SmsNotification`` will be used. +.. tip:: + + You can define and override the transport that a message is using at + runtime by using the + :class:`Symfony\\Component\\Messenger\\Stamp\\TransportNamesStamp` on + the envelope of the message. This stamp takes an array of transport + name as its only argument. For more information about stamps, see + `Envelopes & Stamps`_. + +.. versionadded:: 6.2 + + The :class:`Symfony\\Component\\Messenger\\Stamp\\TransportNamesStamp` + stamp was introduced in Symfony 6.2. + Doctrine Entities in Messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~