diff --git a/src/bundle/Command/BuildDebugContainerTrait.php b/src/bundle/Command/BuildDebugContainerTrait.php new file mode 100644 index 0000000..d8c023b --- /dev/null +++ b/src/bundle/Command/BuildDebugContainerTrait.php @@ -0,0 +1,57 @@ +containerBuilder) { + return $this->containerBuilder; + } + + if (!$kernel->isDebug() || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) { + $buildContainer = \Closure::bind(function () { + $this->initializeBundles(); + + return $this->buildContainer(); + }, $kernel, \get_class($kernel)); + $container = $buildContainer(); + $container->getCompilerPassConfig()->setRemovingPasses([]); + $container->getCompilerPassConfig()->setAfterRemovingPasses([]); + $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; + } +} diff --git a/src/bundle/Command/SymfonyConfigDebugCommand.php b/src/bundle/Command/SymfonyConfigDebugCommand.php new file mode 100644 index 0000000..8a63196 --- /dev/null +++ b/src/bundle/Command/SymfonyConfigDebugCommand.php @@ -0,0 +1,21 @@ +