Skip to content

Commit c66a4fd

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: Revert "bug #48027 [DependencyInjection] Don't autoconfigure tag when it's already set with attributes (nicolas-grekas)"
2 parents 11e33ed + 0d71037 commit c66a4fd

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Compiler/ResolveInstanceofConditionalsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private function processDefinition(ContainerBuilder $container, string $id, Defi
129129
foreach ($instanceofTags[$i] as $k => $v) {
130130
if (null === $definition->getDecoratedService() || \in_array($k, $tagsToKeep, true)) {
131131
foreach ($v as $v) {
132-
if ($definition->hasTag($k) && (!$v || \in_array($v, $definition->getTag($k)))) {
132+
if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k))) {
133133
continue;
134134
}
135135
$definition->addTag($k, $v);

Tests/Compiler/IntegrationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,6 @@ static function (ChildDefinition $definition, CustomAutoconfiguration $attribute
849849
$definition->addTag('app.custom_tag', get_object_vars($attribute) + ['class' => $reflector->getName()]);
850850
}
851851
);
852-
$container->registerForAutoconfiguration(TaggedService1::class)->addTag('app.custom_tag');
853852

854853
$container->register('one', TaggedService1::class)
855854
->setPublic(true)

0 commit comments

Comments
 (0)