Skip to content

Commit 4a66588

Browse files
Merge branch '6.2' into 6.3
* 6.2: fix merge [DependencyInjection] Filter "container.excluded" services when using `findTaggedServiceIds()` [Cache] Removing null coalescing assignment operator on 5.4 [Console] Add missing ZSH mention in DumpCompletionCommand help [Cache] Fix storing binary keys when using pgsql [FrameworkBundle] Add missing monolog channel tag for messenger services update documentation for telegram bridge notifier [FrameworkBundle] Improve documentation about translation:extract --sort option [VarDumper] Disable links for IntelliJ platform [Notifier] Add bridge documentation [HttpClient] Add hint about `timeout` and `max_duration` options [HttpFoundation] Use separate caches for IpUtils checkIp4 and checkIp6 [FrameworkBundle] Fix wiring session.handler when handler_id is null [FrameworkBundle] Workflow - Fix LogicException about a wrong configuration of "enabled" node
2 parents a75fc8c + 143f83b commit 4a66588

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ContainerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ public function findTaggedServiceIds(string $name, bool $throwOnAbstract = false
12981298
$this->usedTags[] = $name;
12991299
$tags = [];
13001300
foreach ($this->getDefinitions() as $id => $definition) {
1301-
if ($definition->hasTag($name)) {
1301+
if ($definition->hasTag($name) && !$definition->hasTag('container.excluded')) {
13021302
if ($throwOnAbstract && $definition->isAbstract()) {
13031303
throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name));
13041304
}

Tests/ContainerBuilderTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,11 @@ public function testfindTaggedServiceIds()
10531053
->addTag('bar', ['bar' => 'bar'])
10541054
->addTag('foo', ['foofoo' => 'foofoo'])
10551055
;
1056+
$builder
1057+
->register('bar', 'Bar\FooClass')
1058+
->addTag('foo')
1059+
->addTag('container.excluded')
1060+
;
10561061
$this->assertEquals([
10571062
'foo' => [
10581063
['foo' => 'foo'],

0 commit comments

Comments
 (0)