Skip to content

Commit

Permalink
[FrameworkBundle] resolve service locators in debug:* commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Dec 2, 2019
1 parent 7a13ea3 commit 820da66
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
Expand Down Expand Up @@ -198,6 +199,8 @@ protected function getContainerBuilder()
$container->compile();
} else {
(new XmlFileLoader($container = new ContainerBuilder(), new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump'));
$locatorPass = new ServiceLocatorTagPass();
$locatorPass->process($container);
}

return $this->containerBuilder = $container;
Expand Down

0 comments on commit 820da66

Please sign in to comment.