You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownew \InvalidArgumentException(sprintf('Services tagged with "cache.pool" must have a parent service but "%s" has none.', $id));
@@ -39,7 +37,11 @@ public function process(ContainerBuilder $container)
39
37
do {
40
38
$adapterId = $adapter->getParent();
41
39
$adapter = $container->getDefinition($adapterId);
42
-
} while ($adapterinstanceof DefinitionDecorator && !$adapter->getTag('cache.adapter'));
40
+
} while ($adapterinstanceof DefinitionDecorator && !$adapter->hasTag('cache.adapter'));
41
+
42
+
if (!$adapter->hasTag('cache.adapter')) {
43
+
thrownew \InvalidArgumentException(sprintf('Services tagged with "cache.pool" must have a parent service tagged with "cache.adapter" but "%s" has none.', $id));
44
+
}
43
45
44
46
$tags = $adapter->getTag('cache.adapter');
45
47
@@ -51,7 +53,7 @@ public function process(ContainerBuilder $container)
51
53
thrownew \InvalidArgumentException(sprintf('Services tagged as "cache.adapter" must be abstract: "%s" is not.', $adapterId));
52
54
}
53
55
54
-
if (0 <= $namespaceArgIndex) {
56
+
if (0 <= $namespaceArgIndex = $tags[0]['namespace_arg_index']) {
$this->assertTrue(isset($tag[0]['id']), 'The adapter name is the "id" attribute of the "cache.adapter" tag.');
679
-
$this->assertSame($name, $tag[0]['id'], 'The adapter name is the "id" attribute of the "cache.adapter" tag.');
680
-
681
681
if (null !== $namespaceArgumentIndex) {
682
682
$this->assertTrue(isset($tag[0]['namespace-arg-index']), 'The namespace argument index is given by the "namespace-arg-index" attribute of the "cache.adapter" tag.');
683
683
$this->assertSame($namespaceArgumentIndex, $tag[0]['namespace-arg-index'], 'The namespace argument index is given by the "namespace-arg-index" attribute of the "cache.adapter" tag.');
0 commit comments