Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ message class (or a message interface)::
using PHP 7.4), by implementing :class:`Symfony\\Component\\Messenger\\Handler\\MessageHandlerInterface`
instead.

.. note::

As of Symfony 6.1, the ``AsMessageHandler`` attribute can be used on individual
class methods as well. You may use the attribute on as many methods in a single
class as you like, allowing you to group the handling of multiple related types
of messages.

Thanks to :ref:`autoconfiguration <services-autoconfigure>` and the ``SmsNotification``
type-hint, Symfony knows that this handler should be called when an ``SmsNotification``
message is dispatched. Most of the time, this is all you need to do. But you can
Expand Down