Skip to content

Commit

Permalink
[FrameworkBundle] Add support for autowiring ServicesResetter and mak…
Browse files Browse the repository at this point in the history
…e it always available
  • Loading branch information
lyrixx committed Jul 7, 2019
1 parent 6811aaa commit 4697907
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Expand Up @@ -112,6 +112,7 @@
</service>

<service id="services_resetter" class="Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter" public="true" />
<service id="Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter" alias="services_resetter" />

<service id="reverse_container" class="Symfony\Component\DependencyInjection\ReverseContainer">
<argument type="service" id="service_container" />
Expand Down
Expand Up @@ -52,13 +52,6 @@ public function process(ContainerBuilder $container)
$methods[$id] = $attributes['method'];
}

if (empty($services)) {
$container->removeAlias('services_resetter');
$container->removeDefinition('services_resetter');

return;
}

$container->findDefinition('services_resetter')
->setArgument(0, new IteratorArgument($services))
->setArgument(1, $methods);
Expand Down

0 comments on commit 4697907

Please sign in to comment.