Skip to content

Commit f57bcb6

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Revert "bug #48027 [DependencyInjection] Don't autoconfigure tag when it's already set with attributes (nicolas-grekas)"
2 parents 3c1afda + d73ab82 commit f57bcb6

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php

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

src/Symfony/Component/DependencyInjection/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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy