Probably a note to self.
Cause a fatal PHP error in admin when debug = true
Red type Symfony stack trace, with the multiple exceptions or errors shown
Joomla error page showing only the latest stack trace
Labels |
Added:
No Code Attached Yet
|
With debug mode enabled, It would be much better to show the Symfony error handler which has more features including click to launch code in IDE support (PR Coming soon).
With debug mode disabled, we can leave the Joomla Exception Handler to display the error (as it does now, without a stack trace)
That need to discuss, what other want/like. I am fine with both approach.
Btw, symfony error handler "full report" also work when error_reaporting => maximum
, not required debug => true
(that may be overhead in some cases)
error_reporting
is more about hiding and showing PHP errors and should (and does) only map to the PHP ini setting error_reporting
error_reporting
was a quick way to hide PHP warnings in older versions of Mambo/Joomla
It makes no sense to have error_reporting
on and debug mode off.
Debug mode however should show stack traces and helpful debug information - and IMHO - should also enable by default, when debug is enabled, error_reporting(E_ALL) and display_errors = On.
With debug mode enabled, It would be much better to show the Symfony error handler
Joomla's exception handler is aware of request format - it can handle appropriately for JSON, JSON API, XML etc - symfony's only deals with cli/html.
Joomla's HTML renderer could definitely be enhanced or pass it through to Symfony - but I don't think we want to completely shortcut it out. It's also still at the stage where because we set the response body into the application we can have plugin events trigger on render of the error page (Symfony's one was put higher level when we didn't have that level of information available).
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-25 12:16:58 |
Closed_By | ⇒ | PhilETaylor |
ok cool
Just to be clear we can improve things to be sure. Just completely removing the Joomla Exception handler isn't the right approach but there's definitely scope to improve things.
No worries... first I have to completely rewrite the LDAP plugin... for the 5 people in the world using it :)
That is expected. All exceptions from Application handled by Joomla Exception handler.
Symfony ErrorHandler used for boot process, and when Joomla Exception handler failed (then you will get 2 exceptions in a list, as on your screen).