Skip to content

Commit

Permalink
Tests: minor cleanup
Browse files Browse the repository at this point in the history
Follow up on PR 305. By setting the minimum PHPUnit 9.x version to 9.3, we no longer have to backfill the missing Xdebug constants.
  • Loading branch information
jrfnl committed Sep 30, 2022
1 parent 8d100f0 commit 7fbb99b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions Tests/bootstrap.php
Expand Up @@ -30,22 +30,6 @@
\define('PHP_CODESNIFFER_VERBOSITY', 0);
}

/*
* PHPUnit 9.3 is the first version which supports Xdebug 3, but we're using PHPUnit 9.2
* for code coverage due to PHP_Parser interfering with our tests.
*
* For now, until a fix is pulled to allow us to use PHPUnit 9.3, this will allow
* PHPUnit 9.2 to run with Xdebug 3 for code coverage.
*/
if (\extension_loaded('xdebug') && \version_compare(\phpversion('xdebug'), '3', '>=')) {
if (\defined('XDEBUG_CC_UNUSED') === false) {
\define('XDEBUG_CC_UNUSED', null);
}
if (\defined('XDEBUG_CC_DEAD_CODE') === false) {
\define('XDEBUG_CC_DEAD_CODE', null);
}
}

if (\is_dir(\dirname(__DIR__) . '/vendor') && \file_exists(\dirname(__DIR__) . '/vendor/autoload.php')) {
$vendorDir = \dirname(__DIR__) . '/vendor';
} else {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -30,7 +30,7 @@
"ext-filter": "*",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
"php-parallel-lint/php-console-highlighter": "^1.0",
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.3",
"yoast/phpunit-polyfills": "^1.0.1"
},
"conflict": {
Expand Down

0 comments on commit 7fbb99b

Please sign in to comment.