summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2021-02-21 11:08:30 +0100
committerFlorian Pritz <bluewind@xinu.at>2021-02-21 11:08:30 +0100
commit29e6c8ad462a426f4bc6d380646e434e3361a21d (patch)
tree121e7ec9a5aa926a7cfffc40f33fdc156fac4d76
parent78b9b272de889809bf05529bf91cc94829a5f9e6 (diff)
PHP8: Update code coverage plugin for compabtibility
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--composer.json2
-rw-r--r--public_html/index.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/composer.json b/composer.json
index b656d8a53..3c77414f3 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"paragonie/random_compat": "Provides better randomness in PHP 5.x"
},
"require-dev": {
- "phpunit/php-code-coverage": "^4 || ^5 || ^6 || ^7 || ^8",
+ "phpunit/php-code-coverage": "^9 || ^10",
"ext-xdebug": "*"
}
}
diff --git a/public_html/index.php b/public_html/index.php
index aa9e12ec4..930737eb1 100644
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -359,11 +359,11 @@ if (getenv("ENVIRONMENT") === "testsuite" && getenv("COLLECT_COVERAGE") == 1) {
if ($testname) {
include APPPATH."../vendor/autoload.php";
$filter = new \SebastianBergmann\CodeCoverage\Filter();
- $filter->addDirectoryToWhitelist(APPPATH);
- $filter->removeDirectoryFromWhitelist(APPPATH."/third_party/");
+ $filter->includeDirectory(APPPATH);
+ $filter->excludeDirectory(APPPATH."/third_party/");
// Force phpdbg for speed
//$driver = new \SebastianBergmann\CodeCoverage\Driver\PHPDBG();
- $driver = null;
+ $driver = (new \SebastianBergmann\CodeCoverage\Driver\Selector)->forLineCoverage($filter);
$coverage = new \SebastianBergmann\CodeCoverage\CodeCoverage($driver, $filter);
$coverage->start($testname);
}