Include error backtrace in fatal error handler message#6291
Conversation
|
Hello! 👋 Thanks for opening this pull request! Please check out our contributing guidelines. We appreciate you taking the initiative to contribute to this project. Contributing isn't limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation. Here are some useful Composer commands to get you started:
To run a single Behat test, you can use the following command: # Run all tests in a single file
composer behat features/some-feature.feature
# Run only a specific scenario (where 123 is the line number of the "Scenario:" title)
composer behat features/some-feature.feature:123You can find a list of all available Behat steps in our handbook. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Updates WP-CLI’s fatal error messaging so users see more diagnostic detail (the underlying PHP fatal error) alongside the existing plugin/theme skip rerun suggestions.
Changes:
- Append the raw fatal error message (
error_get_last()['message']) to the WP-CLI fatal error output. - Tighten the
$errorphpdoc to an array-shape for improved static analysis.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request updates the PHPDoc type hint for the error parameter in ShutdownHandler.php and appends the error message to the critical error notification. I have suggested sanitizing the appended error message using wp_strip_all_tags to ensure consistent and clean output in the terminal.
Co-authored-by: Copilot <[email protected]>
Before:
After: