Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 31, 2020
1 parent 2e63184 commit 4f93e8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Coverage change log

## ?.?.? / ????-??-??

## 1.1.1 / 2020-10-31

* Removed workaround for sebastianbergmann/php-code-coverage#820 after
it has been fixed there.
(@thekid)

## 1.1.0 / 2020-10-04

* Merged PR #10: Upgrade phpunit/php-code-coverage to version 9.0+. This
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"require" : {
"xp-framework/core": "^10.0 | ^9.0 | ^8.0",
"xp-framework/unittest": "^11.0 | ^10.0 | ^9.7",
"phpunit/php-code-coverage": "^9.0 | ^8.0 | ^7.0 | ^6.0 | ^5.3",
"phpunit/php-code-coverage": "^9.2.2 | ^8.0 | ^7.0 | ^6.0 | ^5.3",
"php": ">=7.0.0"
},
"bin": ["bin/xp.xp-forge.coverage"],
Expand Down
19 changes: 0 additions & 19 deletions src/main/php/unittest/coverage/impl/Coverage9.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,6 @@
/** Coverage implementation for php-code-coverage >= 9.0 */
class Coverage9 extends Implementation {

/** @codeCoverageIgnore */
static function __static() {

// Workaround for fatal error in php-code-coverage when PHPUnit is not loaded
// See https://github.com/sebastianbergmann/php-code-coverage/issues/820
if (!class_exists(BaseTestRunner::class)) {
eval('namespace PHPUnit\Runner; class BaseTestRunner {
const STATUS_UNKNOWN = -1;
const STATUS_PASSED = 0;
const STATUS_SKIPPED = 1;
const STATUS_INCOMPLETE = 2;
const STATUS_FAILURE = 3;
const STATUS_ERROR = 4;
const STATUS_RISKY = 5;
const STATUS_WARNING = 6;
}');
}
}

/** Creates a new backing instance */
protected function newInstance(): CodeCoverage {
return new CodeCoverage((new Selector())->forLineCoverage($this->filter), $this->filter);
Expand Down

0 comments on commit 4f93e8d

Please sign in to comment.