Skip to content

Commit 592c7cc

Browse files
committed
Raise minimum PHPUnit version
1 parent 8876b31 commit 592c7cc

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"phan/phan": "^5.4.5",
3636
"phpstan/phpstan": "^1.12",
3737
"phpstan/phpstan-strict-rules": "^1.6",
38-
"phpunit/phpunit": "^8.5.36 || ^9.6.15",
38+
"phpunit/phpunit": "^9.6.15",
3939
"psalm/plugin-phpunit": "^0.19",
4040
"sabre/event": ">= 5.1.6",
4141
"symfony/filesystem": ">= 5.4.45",

phpunit.xml.dist

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
35
backupGlobals="true"
46
beStrictAboutTestsThatDoNotTestAnything="false"
57
bootstrap="tests/bootstrap.php"
@@ -9,9 +11,9 @@
911
<file>vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php</file>
1012
</testsuite>
1113
</testsuites>
12-
<filter>
13-
<whitelist processUncoveredFilesFromWhitelist="false">
14+
<coverage processUncoveredFiles="false">
15+
<include>
1416
<directory suffix=".php">./MO4/Sniffs</directory>
15-
</whitelist>
16-
</filter>
17+
</include>
18+
</coverage>
1719
</phpunit>

tests/bootstrap.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,3 @@ static function ($v) use ($myStandardName): bool {
4343
);
4444

4545
putenv("PHPCS_IGNORE_TESTS={$ignoredStandardsStr}");
46-
47-
/*
48-
* PHPUnit 9.3 is the first version which supports Xdebug 3, but we're using older versions.
49-
*
50-
* For now, until a fix is pulled into the whole stack, this will allow older PHPUnit
51-
* versions to run with Xdebug 3 for code coverage.
52-
*/
53-
54-
if ((true === extension_loaded('xdebug')) && (true === version_compare((string) phpversion('xdebug'), '3', '>='))) {
55-
if (false === defined('XDEBUG_CC_UNUSED')) {
56-
define('XDEBUG_CC_UNUSED', null);
57-
}
58-
59-
if (false === defined('XDEBUG_CC_DEAD_CODE')) {
60-
define('XDEBUG_CC_DEAD_CODE', null);
61-
}
62-
}

0 commit comments

Comments
 (0)