Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to allow more fatal error logging #53

Closed
samsonasik opened this issue Sep 18, 2018 · 1 comment
Closed

Refactor to allow more fatal error logging #53

samsonasik opened this issue Sep 18, 2018 · 1 comment
Labels

Comments

@samsonasik
Copy link
Owner

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:

  1. move the display_errors check to early in process() or bootstrap event from the trait
  2. move the logging to phpErrorHandler() function
  3. "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
Copy link
Owner Author

implemented at #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant