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

Upgrade to PHPUnit 10 #1551

Merged
merged 1 commit into from
Feb 10, 2023
Merged

Upgrade to PHPUnit 10 #1551

merged 1 commit into from
Feb 10, 2023

Conversation

hemberger
Copy link
Member

The major functional changes from 9.5 to 10.0 are:

  • Annotations are converted to attributes.
  • Data providers must now be static.

Many data provider functions are converted to TestWith attributes. These are safer now as attributes, because they can contain real PHP objects (previously they had to be a JSON representation). When the data sets are trivial, this is much simpler and more compact.

PHPUnit no longer returns non-zero exit code on notices/deprecations, though they will still be printed in the results due to the use of the displayDetailsOnTestsThatTrigger* settings. For more info, see: sebastianbergmann/phpunit#5196

All tests are upgraded using the PHPUNIT_100 rector ruleset. It didn't work perfectly, so some manual fixes were necessary.

Add custom CSS for phpunit HTML code coverage. This uses dark-mode and colorblind-friendly colors.

The major functional changes from 9.5 to 10.0 are:

* Annotations are converted to attributes.
* Data providers must now be static.

Many data provider functions are converted to `TestWith` attributes.
These are safer now as attributes, because they can contain real PHP
objects (previously they had to be a JSON representation). When the
data sets are trivial, this is much simpler and more compact.

PHPUnit no longer returns non-zero exit code on notices/deprecations,
though they will still be printed in the results due to the use of the
`displayDetailsOnTestsThatTrigger*` settings. For more info, see:
sebastianbergmann/phpunit#5196

All tests are upgraded using the PHPUNIT_100 rector ruleset. It didn't
work perfectly, so some manual fixes were necessary.

Add custom CSS for phpunit HTML code coverage. This uses dark-mode and
colorblind-friendly colors.
@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Base: 29.58% // Head: 29.85% // Increases project coverage by +0.27% 🎉

Coverage data is based on head (813af89) compared to base (c08418f).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1551      +/-   ##
============================================
+ Coverage     29.58%   29.85%   +0.27%     
+ Complexity     3977     3975       -2     
============================================
  Files           120      120              
  Lines         11633    12241     +608     
============================================
+ Hits           3442     3655     +213     
- Misses         8191     8586     +395     
Impacted Files Coverage Δ
src/lib/Smr/Container/DiContainer.php 91.89% <0.00%> (-4.89%) ⬇️
src/lib/Smr/Location.php 24.46% <0.00%> (-0.54%) ⬇️
src/lib/Smr/Account.php 24.80% <0.00%> (-0.39%) ⬇️
src/lib/Smr/Alliance.php 29.10% <0.00%> (-0.33%) ⬇️
src/lib/Smr/Planet.php 43.54% <0.00%> (-0.21%) ⬇️
src/lib/Smr/AbstractPlayer.php 10.15% <0.00%> (-0.19%) ⬇️
src/lib/Default/smr.inc.php 1.40% <0.00%> (-0.10%) ⬇️
src/lib/Smr/Game.php 70.47% <0.00%> (-0.05%) ⬇️
src/lib/Smr/Menu.php 0.00% <0.00%> (ø)
src/lib/Smr/News.php 0.00% <0.00%> (ø)
... and 65 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

1 participant