.. include:: /Includes.rst.txt .. _important-101700-1703832449: ========================================================================== Feature: #101700 - Use Symfony attribute to autoconfigure message handlers ========================================================================== See :issue:`101700` Description =========== The symfony PHP attribute :php:`\Symfony\Component\Messenger\Attribute\AsMessageHandler` is now respected and allows to register services as message handlers by setting the attribute on the class or the method. Before: .. code-block:: yaml :caption: EXT:my_extension/Configuration/Services.yaml MyVendor\MyExtension\Queue\Handler\DemoHandler: tags: - name: 'messenger.message_handler' After: The registration can be removed from the :file:`Configuration/Services.yaml` file and the attribute is assigned to the handler class instead: .. code-block:: php :caption: EXT:my_extension/Classes/Queue/Handler.php