From 4cfc8d2c2e1f49758a527827513e79af0939b424 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sun, 9 Nov 2025 23:55:36 +0900 Subject: [PATCH] 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 element - Move cacheDirectory to 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. --- composer.json | 3 ++- phpunit.xml.dist | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 9f5b1d2..78b4fc4 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "ext-redis": "*", "ext-memcached": "*", "bamarni/composer-bin-plugin": "^1.4", - "phpunit/phpunit": "^9.5.28" + "phpunit/phpunit": "^11.5.43", + "rector/rector": "^2.2" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index cc4d590..fb7c4a7 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,18 +1,23 @@ - + bootstrap="tests/bootstrap.php" + cacheDirectory=".phpunit.cache"> + src + + src-deprecated + + + tests - tests-pecl-ext - tests-php8 + tests-pecl-ext + tests-php8