| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Apologies for the additional notifications, there are understandably quite a lot of tests that trigger fatal errors. |
Sorry, something went wrong.
|
I really don't like the amount of changed files. The default for test runner should be to not display it IMHO. |
Sorry, something went wrong.
It is unfortunate; I have a similar feature I was working on that changed error output and the amount of tests it involved touching was really annoying, both to update tests and to review. |
Sorry, something went wrong.
|
Can you please add error_backtrace_recording=0 to $ini_overwrites in run-tests.php (and revert most of the phpt changes) - it's generally just noise in all tests. |
Sorry, something went wrong.
I'll take that into consideration - I'm waiting on the RFC discussion and potential vote before making any further changes at this time. Please chime in there if you have any other thoughts on this proposal, I'd appreciate it! That said, I've kept the changes to a separate commit, which should allow people to review the first commit in isolation without needing to go through the changed tests. I don't really feel strongly here, however, so if people either want this to default to off (which is a voting option), or just to default to off for tests (which we could decide in the implementation), I'm fine with making the change once we've moved further along in the discussion. |
Sorry, something went wrong.
There was a problem hiding this comment.
I'll add that I am also not in favour of changes to alllll the tests. I would also add, that the PHP project does not prefix their commit messages with feat: etc.
Sorry, something went wrong.
There was a problem hiding this comment.
Not a huge fan of the code churn. IMO, the stack trace should be avoided for compile errors, where the trace is really just noise.
Sorry, something went wrong.
|
Apologies for bumping this PR again - I'm going to look into backporting this internally as I assume the code won't change at this point - but any chance this could get merged sometime this week? |
Sorry, something went wrong.
|
Maybe @iluuu1994 or @dstogov still have comments, but I don't see problems anymore. |
Sorry, something went wrong.
There was a problem hiding this comment.
I don't like the RFC, but it's accepted and I don't see technical problems in the implementation.
Sorry, something went wrong.
|
Hey @dstogov, thanks for taking a look! If you don't like the RFC, would you mind elaborating on what about it you don't like, either privately at my email address, or here? I have some interest in thinking more about error handling and formatting, although I'm happy this RFC at least solves the initial problem I aimed to solve. I'll note that I shared some thoughts on changing how the error callback works in https://externals.io/message/126110#126121, but I didn't get any follow-up discussion to that. |
Sorry, something went wrong.
|
I just merged the latest master and added NEWS/UPGRADING. Will merge once the CI passes. |
Sorry, something went wrong.
|
Now merged. Don't forget to adjust the status in the Wiki. |
Sorry, something went wrong.
|
Thanks @TimWolla, and done. I appreciate everyone's feedback, and again, if you have additional thoughts on error handling, feel free to reach out to me. |
Sorry, something went wrong.
Since phpGH-17056, the result may return the backtrace array.
This became visible after phpGH-17056 was merged, but technically the lack of setting the opline is also present on lower branches. We set the opline to mirror the SAVE_OPLINE() from ZEND_INIT_STATIC_METHOD_CALL().
|
php.ini not updated |
Sorry, something went wrong.
This is a useful feature, but enabling it by default requires rewriting every PHPT file's output section. Since that would be a hellish diff to make and to review, I think the best option is unfortunately, another INI option. We can enable this for prod/dev recommended INIs, but make sure it's disabled for the test runner. This takes some inspiration from the discussion in phpGH-17056, which has similar problems to this PR.
| Back | FazBrowse Home | New Git URL |
This pull request seeks to continue the work from #5642, but using an implementation more in line with what nikic suggested in https://externals.io/message/110302#113264:
The RFC will be at https://wiki.php.net/rfc/error_backtraces_v2.
I've created a new INI setting, error_backtrace_recording, which users can set to an error mask to enable backtraces for those errors. It defaults to E_FATAL_ERRORS, which I've also exposed as a userland constant.
Considering the default, any fatal error will now have a backtrace associated with it. For example, a script timeout will now look like:
This would have been useful to us very recently: we had an issue in production that presented as "Maximum execution time of X second exceeded" errors, and it was difficult for us to identity the underlying culprit. We eventually identified it as an infinite loop, which would have been incredibly obvious in a trace if it was available.
The implementation respects the zend.exception_ignore_args INI setting and the SensitiveParameter attributes, so users can ensure that sensitive arguments do not end up in the backtrace.
I have some open questions about this implementation:
I've updated all tests that are now failing due to the stack trace in the second commit, to keep the diff reviewable.