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

No stack trace shown when an error occurs during bootstrap #4877

Closed
ShaneOH opened this issue Jan 31, 2022 · 2 comments · Fixed by #4878
Closed

No stack trace shown when an error occurs during bootstrap #4877

ShaneOH opened this issue Jan 31, 2022 · 2 comments · Fixed by #4878
Labels
feature/test-runner CLI test runner type/bug Something is broken

Comments

@ShaneOH
Copy link
Contributor

ShaneOH commented Jan 31, 2022

Hey there, I noticed there was a recent commit that added some helpful debug info when the bootstrap script fails:

ef1b6b1

I found in my case, I have a large bootstrap file that's somewhat complex, and the output I got was:

./vendor/bin/phpunit --bootstrap system/bootstrap.php testing
PHPUnit 9.5.13 by Sebastian Bergmann and contributors.

Error in bootstrap script: Error:
Call to a member function query() on null

Given the complexity, this still wasn't too useful in tracing down the issue until I went in and manually added a stack trace to the error output.

Is there a reason to omit a stack trace? If not, I will happily open a PR to add it!

@ShaneOH ShaneOH added the type/enhancement A new idea that should be implemented label Jan 31, 2022
@sebastianbergmann
Copy link
Owner

Feel free to send a PR.

@ShaneOH
Copy link
Contributor Author

ShaneOH commented Feb 1, 2022

@sebastianbergmann Great -- just opened one here! #4878

@sebastianbergmann sebastianbergmann added feature/test-runner CLI test runner type/bug Something is broken and removed type/enhancement A new idea that should be implemented labels Mar 8, 2022
@sebastianbergmann sebastianbergmann changed the title Adding a Stacktrace to Bootstrap Error No stack trace shown when an error occurs during bootstrap Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner type/bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants