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

Add stack trace to bootstrap error message #4878

Merged

Conversation

ShaneOH
Copy link
Contributor

@ShaneOH ShaneOH commented Feb 1, 2022

Addendum to #4620
Closes #4877

  • Add stack trace to bootstrap error message

Sample output:

PHPUnit 10.0-ga5ad02566 by Sebastian Bergmann and contributors.
 
Error in bootstrap script: PHPUnit\TestFixture\MyException:
Big boom. Big bada boom.
#0 /Users/shane/phpunit/src/TextUI/Application.php(415): include_once()
#1 /Users/shane/phpunit/src/TextUI/Application.php(238): PHPUnit\TextUI\Application-handleBootstrap('/Users/shane/ph...')
#2 /Users/shane/phpunit/src/TextUI/Application.php(95): PHPUnit\TextUI\Application->handleArguments(Array)
#3 /Users/shane/phpunit/src/TextUI/Application.php(78): PHPUnit\TextUI\Application->run(Array, true)
#4 Standard input code(11): PHPUnit\TextUI\Application::main()
#5 {main}

I edited the regression test for #4620 to expect output including a variable number of newlines as would be expected for a stack trace output -- please let me know if any changes are needed!

@sebastianbergmann
Copy link
Owner

Can you change this to target 9.5, please?

@codecov
Copy link

codecov bot commented Feb 2, 2022

Codecov Report

Merging #4878 (7e8727a) into 9.5 (988e84c) will increase coverage by 0.14%.
The diff coverage is 83.11%.

❗ Current head 7e8727a differs from pull request most recent head c8bde01. Consider uploading reports for the commit c8bde01 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##                9.5    #4878      +/-   ##
============================================
+ Coverage     84.08%   84.22%   +0.14%     
- Complexity     4631     5775    +1144     
============================================
  Files           274      549     +275     
  Lines         12683    16537    +3854     
============================================
+ Hits          10665    13929    +3264     
- Misses         2018     2608     +590     
Impacted Files Coverage Δ
src/Event/Value/Test/TestCollectionIterator.php 0.00% <0.00%> (ø)
...rc/Event/Value/TestData/DataFromTestDependency.php 0.00% <0.00%> (ø)
...vent/Value/TestData/TestDataCollectionIterator.php 0.00% <0.00%> (ø)
...vent/Value/TestSuite/FailureCollectionIterator.php 0.00% <0.00%> (ø)
...ework/Attributes/DependsExternalUsingDeepClone.php 0.00% <0.00%> (ø)
...rk/Attributes/DependsExternalUsingShallowClone.php 0.00% <0.00%> (ø)
src/Framework/Attributes/DependsOnClass.php 0.00% <0.00%> (ø)
...mework/Attributes/DependsOnClassUsingDeepClone.php 0.00% <0.00%> (ø)
...ork/Attributes/DependsOnClassUsingShallowClone.php 0.00% <0.00%> (ø)
src/Framework/Attributes/DependsUsingDeepClone.php 0.00% <0.00%> (ø)
... and 623 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 988e84c...c8bde01. Read the comment docs.

@ShaneOH ShaneOH changed the base branch from master to 9.5 February 2, 2022 15:54
@ShaneOH ShaneOH changed the base branch from 9.5 to master February 2, 2022 16:09
@ShaneOH ShaneOH changed the base branch from master to 9.5 February 2, 2022 16:13
@ShaneOH
Copy link
Contributor Author

ShaneOH commented Feb 2, 2022

@sebastianbergmann Sure, done!

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

Successfully merging this pull request may close these issues.

No stack trace shown when an error occurs during bootstrap
2 participants