Skip to content

Commit e7d0d03

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Revert "bug #48027 [DependencyInjection] Don't autoconfigure tag when it's already set with attributes (nicolas-grekas)"
2 parents ba91838 + 3b75e0a commit e7d0d03

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
@@ -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);

src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php

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

852851
$container->register('one', TaggedService1::class)
853852
->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