From 9731451b5affe8271c11d7e2e0b38153e3191016 Mon Sep 17 00:00:00 2001 From: Remon van de Kamp Date: Mon, 10 Aug 2020 19:30:39 +0200 Subject: [PATCH] Revert "[DependencyInjection] Resolve parameters in tag arguments" This reverts commit 3dba1fe7bfbef251c2481c75780510f63188b383. --- .../Component/DependencyInjection/CHANGELOG.md | 1 - .../DependencyInjection/ContainerBuilder.php | 2 +- .../Tests/ContainerBuilderTest.php | 16 ---------------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/CHANGELOG.md b/src/Symfony/Component/DependencyInjection/CHANGELOG.md index ac8f6c5e94c83..0011d9cd3880f 100644 --- a/src/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/src/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -6,7 +6,6 @@ CHANGELOG * added `param()` and `abstract_arg()` in the PHP-DSL * deprecated `Definition::setPrivate()` and `Alias::setPrivate()`, use `setPublic()` instead - * added support for parameters in service tag arguments 5.1.0 ----- diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index c9fd0aa9697f1..2153304485fd4 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -1250,7 +1250,7 @@ public function findTaggedServiceIds(string $name, bool $throwOnAbstract = false if ($throwOnAbstract && $definition->isAbstract()) { throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name)); } - $tags[$id] = $this->parameterBag->resolveValue($definition->getTag($name)); + $tags[$id] = $definition->getTag($name); } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index 0d1441f27f3bd..375187a9368fe 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -911,22 +911,6 @@ public function testfindTaggedServiceIds() $this->assertEquals([], $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services'); } - public function testResolveTagAttributtes() - { - $builder = new ContainerBuilder(); - $builder->getParameterBag()->add(['foo_argument' => 'foo']); - - $builder - ->register('foo', 'Bar\FooClass') - ->addTag('foo', ['foo' => '%foo_argument%']) - ; - $this->assertEquals($builder->findTaggedServiceIds('foo'), [ - 'foo' => [ - ['foo' => 'foo'], - ], - ], '->findTaggedServiceIds() replaces parameters in tag attributes'); - } - public function testFindUnusedTags() { $builder = new ContainerBuilder(); 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