Skip to content

Commit be579a7

Browse files
[DI] fix failure
1 parent 684ca9f commit be579a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/Loader/YamlFileLoaderTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,11 @@ public function testTaggedArgumentsWithIndex()
306306
$taggedIterator = new TaggedIteratorArgument('foo', 'barfoo', 'foobar', true);
307307
$this->assertEquals(new ServiceLocatorArgument($taggedIterator), $container->getDefinition('foo_service_tagged_locator')->getArgument(0));
308308

309-
$taggedIterator = new TaggedIteratorArgument('foo', null, null, true);
310-
$this->assertEquals(new ServiceLocatorArgument($taggedIterator), $container->getDefinition('bar_service_tagged_locator')->getArgument(0));
309+
if (is_subclass_of('Symfony\Component\Yaml\Exception\ExceptionInterface', 'Throwable')) {
310+
// this test is not compatible with Yaml v3
311+
$taggedIterator = new TaggedIteratorArgument('foo', null, null, true);
312+
$this->assertEquals(new ServiceLocatorArgument($taggedIterator), $container->getDefinition('bar_service_tagged_locator')->getArgument(0));
313+
}
311314
}
312315

313316
public function testNameOnlyTagsAreAllowedAsString()

0 commit comments

Comments
 (0)