This repository was archived by the owner on Feb 10, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Component/HttpKernel/EventListener Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 35
35
use Symfony \Component \Cache \DependencyInjection \CachePoolPrunerPass ;
36
36
use Symfony \Component \Config \Resource \ClassExistenceResource ;
37
37
use Symfony \Component \Console \DependencyInjection \AddConsoleCommandPass ;
38
+ use Symfony \Component \Debug \ErrorHandler as LegacyErrorHandler ;
38
39
use Symfony \Component \DependencyInjection \Compiler \PassConfig ;
39
40
use Symfony \Component \DependencyInjection \Compiler \RegisterReverseContainerPass ;
40
41
use Symfony \Component \DependencyInjection \ContainerBuilder ;
@@ -89,6 +90,9 @@ class FrameworkBundle extends Bundle
89
90
public function boot ()
90
91
{
91
92
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
+ }
92
96
93
97
if ($ this ->container ->getParameter ('kernel.http_method_override ' )) {
94
98
Request::enableHttpMethodParameterOverride ();
Original file line number Diff line number Diff line change 15
15
use Symfony \Component \Console \ConsoleEvents ;
16
16
use Symfony \Component \Console \Event \ConsoleEvent ;
17
17
use Symfony \Component \Console \Output \ConsoleOutputInterface ;
18
+ use Symfony \Component \Debug \ErrorHandler as LegacyErrorHandler ;
18
19
use Symfony \Component \Debug \Exception \FatalThrowableError ;
19
20
use Symfony \Component \ErrorHandler \ErrorHandler ;
20
21
use Symfony \Component \EventDispatcher \Event ;
@@ -79,7 +80,7 @@ public function configure(Event $event = null)
79
80
restore_exception_handler ();
80
81
81
82
if ($ this ->logger || null !== $ this ->throwAt ) {
82
- if ($ handler instanceof ErrorHandler) {
83
+ if ($ handler instanceof ErrorHandler || $ handler instanceof LegacyErrorHandler ) {
83
84
if ($ this ->logger ) {
84
85
$ handler ->setDefaultLogger ($ this ->logger , $ this ->levels );
85
86
if (\is_array ($ this ->levels )) {
@@ -138,7 +139,7 @@ public function configure(Event $event = null)
138
139
}
139
140
}
140
141
if ($ this ->exceptionHandler ) {
141
- if ($ handler instanceof ErrorHandler) {
142
+ if ($ handler instanceof ErrorHandler || $ handler instanceof LegacyErrorHandler ) {
142
143
$ handler ->setExceptionHandler ($ this ->exceptionHandler );
143
144
}
144
145
$ this ->exceptionHandler = null ;
You can’t perform that action at this time.
0 commit comments