Refactor to allow more fatal error logging
samsonasik opened this issue · 1 comments
samsonasik commented
Currently, some fatal error like :
Y cannot implement X - it is not an interface
still not logged. The code to reproduce is like below:
class X {}
class Y implements X { }
The fallback down of the error is on register_shutdown_function()
call which when it is overlapped, it is not recorded by logging, as the code exited.
Integrating it into frameworks (zf-mvc and zf-expressive) is not as easy as imagined as it need to follow the dispatch flow.
The steps of refactor are as follow:
- move the display_errors check to early in
process()
orbootstrap
event from the trait - move the logging to
phpErrorHandler()
function - "save" its flag "somewhere", and returns ( display as is ? ) Response instance.
It will require a big refactor, and I will do when I have a time ✌️
samsonasik commented
implemented at #54