Skip to content

Commit 0f6f948

Browse files
[HttpKernel][FrameworkBundle] fix compat with Debug component
1 parent 8e5692c commit 0f6f948

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

FrameworkBundle.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
use Symfony\Component\Cache\DependencyInjection\CachePoolPrunerPass;
3636
use Symfony\Component\Config\Resource\ClassExistenceResource;
3737
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
38+
use Symfony\Component\Debug\ErrorHandler as LegacyErrorHandler;
3839
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
3940
use Symfony\Component\DependencyInjection\Compiler\RegisterReverseContainerPass;
4041
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -89,6 +90,9 @@ class FrameworkBundle extends Bundle
8990
public function boot()
9091
{
9192
ErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true);
93+
if (class_exists(LegacyErrorHandler::class, false)) {
94+
LegacyErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true);
95+
}
9296

9397
if ($this->container->getParameter('kernel.http_method_override')) {
9498
Request::enableHttpMethodParameterOverride();

0 commit comments

Comments
 (0)