We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f8b1e8 commit 46cf330Copy full SHA for 46cf330
messenger.rst
@@ -313,6 +313,24 @@ to multiple transports:
313
$messenger->routing('My\Message\ToBeSentToTwoSenders')->senders(['async', 'audit']);
314
};
315
316
+.. versionadded:: 5.3
317
+
318
+ Ability to configure routing using attributes was introduced in Symfony 5.3.
319
320
+If you are using PHP 8.0 or above, you can use ``Senders`` attribute instead
321
+of ``routing`` key in the configuration:
322
323
+ // src/Message/AsyncMessage.php
324
+ namespace App\Message;
325
326
+ use Symfony\Component\Messenger\Attribute\Senders;
327
328
+ #[Senders('async')]
329
+ class AsyncMessage
330
+ {
331
+ // ...
332
+ }
333
334
.. note::
335
336
If you configure routing for both a child and parent class, both rules
0 commit comments