-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Description
Short bug description
When it comes to the AutoconfigureTag
attribute !tagged_iterator
doesn't process priority
attribute properly, to sort the collection of services (first with the highest priority)
Prerequisite (preparation for the bug)
If we describe something like that in services.yaml
services:
Namespace\:
resource: 'PATH'
tags:
- name: 'TAG_NAME'
And also we have class of that Namespace from that PATH (additionally with an Attribute)
<?php
namespace Namespace;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
#[AutoconfigureTag('TAG_NAME', ['priority' => 1])]
class SomeClass {}
Bug
When I dump the service with php bin/console debug:container Namespace\SomeClass
it show the correct priority
attribute 1
But If I use !tagged_iterator
yaml tag to collect all services with this TAG_NAME I get an incorrect collection
where !tagged_iterator
doesn't read the priority from the AutoconfigureTag
attribute