-
Notifications
You must be signed in to change notification settings - Fork 0
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 phpunit/php-code-coverage to version 9.0+ #10
Conversation
src/test/php/unittest/coverage/tests/CoverageDetailsTest.class.php
Outdated
Show resolved
Hide resolved
Hrm, this breaks PHP 7.0, 7.1 and 7.2 builds: |
Code Coverage BC breaksVersion 9 contains quite a bit of BC breaks, see https://github.com/sebastianbergmann/php-code-coverage/blob/master/ChangeLog.md#900---2020-08-07 The call to construct a $filter= new Filter();
// Version 9, can be detected via class_exists(Selector::class)
$driver= (new Selector())->forLineCoverage($filter);
// Version 6, 7, 8: makes CodeCoverage use its private selectDriver() method
$driver= null;
$coverage= new CodeCoverage($driver, $filter); Report method names have changed away from a get... style: // Before
$report->getNumExecutedLines();
$report->getNumExecutableLines();
$report->getClasses();
// After
$report->numberOfExecutedLines();
$report->numberOfExecutableLines();
$report->classes(); For filters, the verbs have changed completely: // Before
$filter->addDirectoryToWhitelist($folder);
$filter->hasWhitelist();
// After
$filter->includeDirectory($folder);
$filter->isEmpty(); |
...achieving PHP 8 compatibility, see issue #9