[HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors
This commit is contained in:
parent
d662b2152d
commit
a8b83340bb
@ -168,8 +168,10 @@ FrameworkBundle
|
|||||||
|
|
||||||
* The "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter have been deprecated and will be removed in 4.0. Use the Request::setTrustedProxies() method in your front controller instead.
|
* The "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter have been deprecated and will be removed in 4.0. Use the Request::setTrustedProxies() method in your front controller instead.
|
||||||
|
|
||||||
|
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CompilerDebugDumpPass` has been deprecated.
|
||||||
|
|
||||||
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been deprecated. Use `Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead.
|
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been deprecated.
|
||||||
|
Use `Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead.
|
||||||
|
|
||||||
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass` class has been
|
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass` class has been
|
||||||
deprecated and will be removed in 4.0.
|
deprecated and will be removed in 4.0.
|
||||||
|
@ -267,7 +267,10 @@ FrameworkBundle
|
|||||||
`serializer.mapping.cache.apc` and `serializer.mapping.cache.doctrine.apc`
|
`serializer.mapping.cache.apc` and `serializer.mapping.cache.doctrine.apc`
|
||||||
have been removed. APCu should now be automatically used when available.
|
have been removed. APCu should now be automatically used when available.
|
||||||
|
|
||||||
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been removed. Use `Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead.
|
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CompilerDebugDumpPass` has been removed.
|
||||||
|
|
||||||
|
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass` has been removed.
|
||||||
|
Use `Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass` instead.
|
||||||
|
|
||||||
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass` class has been removed.
|
* The `Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass` class has been removed.
|
||||||
Use the `Symfony\Component\Serializer\DependencyInjection\SerializerPass` class instead.
|
Use the `Symfony\Component\Serializer\DependencyInjection\SerializerPass` class instead.
|
||||||
|
@ -4,6 +4,7 @@ CHANGELOG
|
|||||||
3.3.0
|
3.3.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
* Deprecated the `CompilerDebugDumpPass` class
|
||||||
* [BC BREAK] Removed the "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter
|
* [BC BREAK] Removed the "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter
|
||||||
* Added a new new version strategy option called json_manifest_path
|
* Added a new new version strategy option called json_manifest_path
|
||||||
that allows you to use the `JsonManifestVersionStrategy`.
|
that allows you to use the `JsonManifestVersionStrategy`.
|
||||||
|
@ -11,12 +11,17 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
|
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
|
||||||
|
|
||||||
|
@trigger_error(sprintf('The %s class is deprecated since version 3.3 and will be removed in 4.0.', CompilerDebugDumpPass::class), E_USER_DEPRECATED);
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||||
use Symfony\Component\Filesystem\Exception\IOException;
|
use Symfony\Component\Filesystem\Exception\IOException;
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated since version 3.3, to be removed in 4.0.
|
||||||
|
*/
|
||||||
class CompilerDebugDumpPass implements CompilerPassInterface
|
class CompilerDebugDumpPass implements CompilerPassInterface
|
||||||
{
|
{
|
||||||
public function process(ContainerBuilder $container)
|
public function process(ContainerBuilder $container)
|
||||||
|
@ -25,7 +25,6 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheWarmerPa
|
|||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheClearerPass;
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheClearerPass;
|
||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass;
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass;
|
||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass;
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass;
|
||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CompilerDebugDumpPass;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslationExtractorPass;
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslationExtractorPass;
|
||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslationDumperPass;
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslationDumperPass;
|
||||||
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass;
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass;
|
||||||
@ -115,7 +114,6 @@ class FrameworkBundle extends Bundle
|
|||||||
$container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
|
$container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
|
||||||
$container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING);
|
$container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING);
|
||||||
$container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING);
|
$container->addCompilerPass(new ContainerBuilderDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING);
|
||||||
$container->addCompilerPass(new CompilerDebugDumpPass(), PassConfig::TYPE_AFTER_REMOVING, -32);
|
|
||||||
$this->addCompilerPassIfExists($container, ConfigCachePass::class);
|
$this->addCompilerPassIfExists($container, ConfigCachePass::class);
|
||||||
$container->addCompilerPass(new CacheCollectorPass());
|
$container->addCompilerPass(new CacheCollectorPass());
|
||||||
}
|
}
|
||||||
|
@ -515,7 +515,13 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
|||||||
$fresh = true;
|
$fresh = true;
|
||||||
if (!$cache->isFresh()) {
|
if (!$cache->isFresh()) {
|
||||||
$container = $this->buildContainer();
|
$container = $this->buildContainer();
|
||||||
|
try {
|
||||||
$container->compile();
|
$container->compile();
|
||||||
|
} finally {
|
||||||
|
if ($this->debug) {
|
||||||
|
file_put_contents($this->getCacheDir().'/'.$class.'Compiler.log', implode("\n", $container->getCompiler()->getLog()));
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
|
$this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass());
|
||||||
|
|
||||||
$fresh = false;
|
$fresh = false;
|
||||||
|
Reference in New Issue
Block a user