Skip to content

Commit 6d0a2f8

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: make fabbot happy use correct spelling when accessing the SMTP php.ini value Fix issue 40507: Tabs as separators between tokens [Cache] phpredis: Added full TLS support for RedisCluster [DependencyInjection][AliasDeprecatedPublicServicesPass] Noop when the service is private
2 parents d11a6df + eef0d92 commit 6d0a2f8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Compiler/AliasDeprecatedPublicServicesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function process(ContainerBuilder $container)
5858

5959
$definition = $container->getDefinition($id);
6060
if (!$definition->isPublic() || $definition->isPrivate()) {
61-
throw new InvalidArgumentException(sprintf('The "%s" service is private: it cannot have the "%s" tag.', $id, $this->tagName));
61+
continue;
6262
}
6363

6464
$container

Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ public function processWithMissingAttributeProvider()
5959

6060
public function testProcessWithNonPublicService()
6161
{
62-
$this->expectException(InvalidArgumentException::class);
63-
$this->expectExceptionMessage('The "foo" service is private: it cannot have the "container.private" tag.');
64-
6562
$container = new ContainerBuilder();
6663
$container
6764
->register('foo')
6865
->addTag('container.private', ['package' => 'foo/bar', 'version' => '1.2']);
6966

7067
(new AliasDeprecatedPublicServicesPass())->process($container);
68+
69+
$this->assertTrue($container->hasDefinition('foo'));
7170
}
7271
}

0 commit comments

Comments
 (0)