Skip to content

Commit 607fa37

Browse files
committed
Upgrade to PHPUnit 11 and modernize configuration
Changes: - Upgrade PHPUnit from ^9.5 to ^11.5 - Add rector/rector ^2.2 for code quality - Update phpunit.xml.dist for PHPUnit 10+ compatibility: - Move include/exclude to <source> element - Move cacheDirectory to <phpunit> root element - Remove deprecated processUncoveredFiles attribute PHPUnit 11 requires PHP 8.2+ which matches project requirements. This also fixes php-parser compatibility with readonly class syntax in --prefer-lowest CI runs.
1 parent 8aca537 commit 607fa37

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"ext-redis": "*",
2121
"ext-memcached": "*",
2222
"bamarni/composer-bin-plugin": "^1.4",
23-
"phpunit/phpunit": "^9.5.28"
23+
"phpunit/phpunit": "^11.5.43",
24+
"rector/rector": "^2.2"
2425
},
2526
"autoload": {
2627
"psr-4": {

phpunit.xml.dist

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4-
bootstrap="tests/bootstrap.php">
5-
<coverage cacheDirectory=".phpunit.cache/code-coverage"
6-
processUncoveredFiles="true">
4+
bootstrap="tests/bootstrap.php"
5+
cacheDirectory=".phpunit.cache">
6+
<source>
77
<include>
88
<directory suffix=".php">src</directory>
99
</include>
10+
<exclude>
11+
<directory suffix=".php">src-deprecated</directory>
12+
</exclude>
13+
</source>
14+
<coverage>
1015
</coverage>
1116
<testsuites>
1217
<testsuite name="Ray.PsrCacheModule test suite">

0 commit comments

Comments
 (0)