diff --git a/ChangeLog.md b/ChangeLog.md index 22ffec5..e7372a6 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/composer.json b/composer.json index 3c64713..4dfc413 100755 --- a/composer.json +++ b/composer.json @@ -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"], diff --git a/src/main/php/unittest/coverage/impl/Coverage9.class.php b/src/main/php/unittest/coverage/impl/Coverage9.class.php index d8861cd..989f450 100755 --- a/src/main/php/unittest/coverage/impl/Coverage9.class.php +++ b/src/main/php/unittest/coverage/impl/Coverage9.class.php @@ -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);