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

test: allow phpunit 10 #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Aug 16, 2024

Try this in cache first just to see what happens.

  1. phpunit 10 does not accept abstract classes for test code, ending with "Test".
There was 1 PHPUnit test runner warning:

1) Class Sabre\Cache\AbstractCacheTest declared in /home/runner/work/cache/cache/tests/Cache/AbstractCacheTest.php is abstract

I renamed AbstractCacheTest to AbstractCacheTestClass and that stopped the warning.

  1. In PHP 8.4 we were running phpunit and asking to produce test coverage data, but hadn't specified the coverage driver "pcov". PHPunit 9 had not made that a failure, but PHPunit 10 fails (correctly) in that case. I fixed it.

PHPunit 10 also gives the message:

There was 1 PHPUnit test runner deprecation:

1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!

That does not fail the test pipeline. We can't do anything about that, because we need to have the phpunit XML config in the version 9 format so that we can use it on PHP 7.4. An alternative would be to update it, and put the old phpunit XML in a different file that we use when running PHPunit 9. That seems to complex/tricky.

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.75%. Comparing base (c7978f1) to head (164a288).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #72   +/-   ##
=========================================
  Coverage     98.75%   98.75%           
  Complexity       89       89           
=========================================
  Files             4        4           
  Lines           160      160           
=========================================
  Hits            158      158           
  Misses            2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@phil-davis phil-davis changed the title test: allow modern phpunit releases test: allow phpunit 10 Aug 16, 2024
@phil-davis phil-davis marked this pull request as ready for review August 16, 2024 10:22
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