Skip to content

Recommend registering the error handler in prod #10668

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

Closed
wants to merge 1 commit into from

Conversation

greg0ire
Copy link
Contributor

This is what currently happens when using Symfony in a standard way, and
people have been wondering online about alarming exceptions from the
Debug component in production.

See https://stackoverflow.com/questions/37431935/is-it-normal-to-have-symfony-component-debug-exception-fatalerrorexception-excep

This is what currently happens when using Symfony in a standard way, and
people have been wondering online about alarming exceptions from the
Debug component in production.

See https://stackoverflow.com/questions/37431935/is-it-normal-to-have-symfony-component-debug-exception-fatalerrorexception-excep
@greg0ire
Copy link
Contributor Author

@ogizanagi @ro0NL please review

@@ -56,6 +57,12 @@ fatal errors)::

ErrorHandler::register();

.. note::

This one is fine to use in a production environment and will be
Copy link
Contributor

@ro0NL ro0NL Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we should advise ppl to register as above in prod, FWBundle explicitly does ErrorHandler::register(null, false)->throwAt(-1, true);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument is null by default, as for the second, it tells the error handler to replace the previous one, which people probably want to do if they decide to use ours, right?

@javiereguiluz javiereguiluz added this to the 3.4 milestone Jan 17, 2019
javiereguiluz added a commit that referenced this pull request Jan 17, 2019
This PR was submitted for the 2.8 branch but it was merged into the 3.4 branch instead (closes #10668).

Discussion
----------

Recommend registering the error handler in prod

This is what currently happens when using Symfony in a standard way, and
people have been wondering online about alarming exceptions from the
Debug component in production.

See https://stackoverflow.com/questions/37431935/is-it-normal-to-have-symfony-component-debug-exception-fatalerrorexception-excep

Commits
-------

f0cd0bf Recommend registering the error handler in prod
@javiereguiluz
Copy link
Member

Thanks Grégoire! We finally merged this (in 3.4).

@greg0ire greg0ire deleted the explain_alarming_exception branch January 17, 2019 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants