Skip to content

Commit 5333825

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: [Messenger] Adds tip for handler misconfiguration
2 parents d684694 + e854adf commit 5333825

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

messenger/multiple_buses.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ you can restrict each handler to a specific bus using the ``messenger.message_ha
197197
This way, the ``App\MessageHandler\SomeCommandHandler`` handler will only be
198198
known by the ``messenger.bus.commands`` bus.
199199

200+
.. tip::
201+
202+
If you manually restrict handlers be sure to have ``autoconfigure`` disabled,
203+
or not implement the ``Symfony\Component\Messenger\Handler\MessageHandlerInterface``
204+
as this might cause your handler to be registered twice.
205+
206+
See :ref:`service autoconfiguration <services-autoconfigure>` for more information.
207+
200208
You can also automatically add this tag to a number of classes by following
201209
a naming convention and registering all of the handler services by name with
202210
the correct tag:

0 commit comments

Comments
 (0)