Skip to content

Commit 34eefcf

Browse files
committed
Revert "[DependencyInjection] Resolve parameters in tag arguments"
This reverts commit 3dba1fe7bfbef251c2481c75780510f63188b383.
1 parent 83bd27a commit 34eefcf

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ CHANGELOG
66

77
* added `param()` and `abstract_arg()` in the PHP-DSL
88
* deprecated `Definition::setPrivate()` and `Alias::setPrivate()`, use `setPublic()` instead
9-
* added support for parameters in service tag arguments
109

1110
5.1.0
1211
-----

ContainerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ public function findTaggedServiceIds(string $name, bool $throwOnAbstract = false
12501250
if ($throwOnAbstract && $definition->isAbstract()) {
12511251
throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name));
12521252
}
1253-
$tags[$id] = $this->parameterBag->resolveValue($definition->getTag($name));
1253+
$tags[$id] = $definition->getTag($name);
12541254
}
12551255
}
12561256

Tests/ContainerBuilderTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -911,22 +911,6 @@ public function testfindTaggedServiceIds()
911911
$this->assertEquals([], $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services');
912912
}
913913

914-
public function testResolveTagAttributtes()
915-
{
916-
$builder = new ContainerBuilder();
917-
$builder->getParameterBag()->add(['foo_argument' => 'foo']);
918-
919-
$builder
920-
->register('foo', 'Bar\FooClass')
921-
->addTag('foo', ['foo' => '%foo_argument%'])
922-
;
923-
$this->assertEquals($builder->findTaggedServiceIds('foo'), [
924-
'foo' => [
925-
['foo' => 'foo'],
926-
],
927-
], '->findTaggedServiceIds() replaces parameters in tag attributes');
928-
}
929-
930914
public function testFindUnusedTags()
931915
{
932916
$builder = new ContainerBuilder();

0 commit comments

Comments
 (0)