Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Fix merging explicit tags and #[AsTaggeditem]#62329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:7.3
Are you sure you want to change the base?
Conversation
| $loadFromDefaultMethods = $reflector && null !== $defaultPriorityMethod; | ||
| if ($reflector && $definition->isAutoconfigured() && !$definition->hasTag('container.ignore_attributes')) { | ||
| $loadFromAttributes = $attributes !== $tagAttributes = array_filter($attributes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
As soon as one tag is listed with no tag-attributes, we load php-attributes.
php-attributes are always loaded first. This allows explicit tags to always win over php-attributes when indexes are explicitly declared.
| $indexAttribute ?? '' => $attribute->index, | ||
| ]; | ||
| if (null === $defaultPriority) { | ||
| $defaultPriority = $attribute->priority ?? 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
only the first php-attribute can define a default priority and default index
and defaults defined by this first php-attribute have lower priority than defaults defined by static methods (getDefaultName et al.)
Note that we'd better deprecate static methods for defaults. php-attributes are cleaner IMHO. For 8.1 I suppose.
06ecad4 tof29141dComparef29141d to074c005Compare
Uh oh!
There was an error while loading.Please reload this page.
Instead of#62327