Skip to content

Commit 4e044dd

Browse files
committed
definitions
1 parent 03870df commit 4e044dd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

DependencyInjection/Compiler/FormatListenerRulesPass.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
namespace FOS\RestBundle\DependencyInjection\Compiler;
1313

14-
use Symfony\Component\DependencyInjection\ChildDefinition;
1514
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1615
use Symfony\Component\DependencyInjection\ContainerBuilder;
16+
use Symfony\Component\DependencyInjection\Definition;
1717
use Symfony\Component\DependencyInjection\Reference;
1818
use Symfony\Component\HttpFoundation\ChainRequestMatcher;
1919
use Symfony\Component\HttpFoundation\RequestMatcher;
@@ -91,8 +91,7 @@ private function createRequestMatcher(ContainerBuilder $container, ?string $path
9191
// only add arguments that are necessary
9292
if (!class_exists(ChainRequestMatcher::class)) {
9393
$container
94-
->setDefinition($id, new ChildDefinition(RequestMatcher::class))
95-
->setArguments($arguments);
94+
->setDefinition($id, new Definition(RequestMatcher::class, $arguments));
9695
} else {
9796
$matchers = [];
9897
if (!empty($path)) {
@@ -108,8 +107,8 @@ private function createRequestMatcher(ContainerBuilder $container, ?string $path
108107
$matchers[] = new AttributesRequestMatcher($attributes);
109108
}
110109
$container
111-
->setDefinition($id, new ChildDefinition(ChainRequestMatcher::class))
112-
->setArguments($matchers);
110+
->setDefinition($id, new Definition(ChainRequestMatcher::class))
111+
->setArguments([$matchers]);
113112
}
114113
}
115114

0 commit comments

Comments
 (0)