From 017464162e290c8d565eef35e192664340207d67 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Oct 2024 16:59:15 +0100 Subject: update to 10.5.38 --- phpunit10-rpm.patch | 76 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 23 deletions(-) (limited to 'phpunit10-rpm.patch') diff --git a/phpunit10-rpm.patch b/phpunit10-rpm.patch index fa07a47..0f7b1d0 100644 --- a/phpunit10-rpm.patch +++ b/phpunit10-rpm.patch @@ -1,6 +1,6 @@ diff -up ./phpunit.rpm ./phpunit ---- ./phpunit.rpm 2024-03-21 10:34:01.000000000 +0100 -+++ ./phpunit 2024-03-21 14:02:24.892294049 +0100 +--- ./phpunit.rpm 2024-10-28 16:44:45.000000000 +0100 ++++ ./phpunit 2024-10-28 16:48:36.313661416 +0100 @@ -46,27 +46,13 @@ if (isset($GLOBALS['_composer_autoload_p define('PHPUNIT_COMPOSER_INSTALL', $GLOBALS['_composer_autoload_path']); @@ -50,18 +50,18 @@ diff -up ./phpunit.rpm ./phpunit + PHPUnit\TextUI\Command::main(); +} diff -up ./src/TextUI/Command/Commands/VersionCheckCommand.php.rpm ./src/TextUI/Command/Commands/VersionCheckCommand.php ---- ./src/TextUI/Command/Commands/VersionCheckCommand.php.rpm 2024-03-21 10:34:01.000000000 +0100 -+++ ./src/TextUI/Command/Commands/VersionCheckCommand.php 2024-03-21 14:02:53.539493026 +0100 -@@ -24,7 +24,7 @@ final class VersionCheckCommand implemen - public function execute(): Result - { - $latestVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit'); -- $latestCompatibleVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit-' . Version::majorVersionNumber()); -+ $latestCompatibleVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit-' . $major=Version::majorVersionNumber()); - - $notLatest = version_compare($latestVersion, Version::id(), '>'); - $notLatestCompatible = version_compare($latestCompatibleVersion, Version::id(), '>'); -@@ -35,7 +35,7 @@ final class VersionCheckCommand implemen +--- ./src/TextUI/Command/Commands/VersionCheckCommand.php.rpm 2024-10-28 16:44:45.000000000 +0100 ++++ ./src/TextUI/Command/Commands/VersionCheckCommand.php 2024-10-28 16:49:46.388400560 +0100 +@@ -39,7 +39,7 @@ final class VersionCheckCommand implemen + + assert($latestVersion !== false); + +- $latestCompatibleVersion = $this->downloader->download('https://phar.phpunit.de/latest-version-of/phpunit-' . $this->majorVersionNumber); ++ $latestCompatibleVersion = $this->downloader->download('https://phar.phpunit.de/latest-version-of/phpunit-' . $major=$this->majorVersionNumber); + + assert($latestCompatibleVersion !== false); + +@@ -52,7 +52,7 @@ final class VersionCheckCommand implemen ); } @@ -70,26 +70,28 @@ diff -up ./src/TextUI/Command/Commands/VersionCheckCommand.php.rpm ./src/TextUI/ if ($notLatestCompatible) { $buffer .= sprintf( -@@ -43,6 +43,7 @@ final class VersionCheckCommand implemen - Version::id(), +@@ -60,6 +60,7 @@ final class VersionCheckCommand implemen + $this->versionId, $latestCompatibleVersion, ); + $buffer .= sprintf('Try a system update for new phpunit%s package.' . PHP_EOL . PHP_EOL, $major); } if ($notLatest) { -@@ -50,6 +51,7 @@ final class VersionCheckCommand implemen +@@ -67,6 +68,9 @@ final class VersionCheckCommand implemen 'The latest version is PHPUnit %s.' . PHP_EOL, $latestVersion, ); -+ $buffer .= sprintf('Try to install and use the phpunit%s command.' . PHP_EOL . PHP_EOL, explode('.', $latestVersion)[0]); ++ if ($major !== ($new = (int)explode('.', $latestVersion)[0])) { ++ $buffer .= sprintf('Try to install and use the phpunit%s command.' . PHP_EOL . PHP_EOL, explode('.', $latestVersion)[0]); ++ } } return Result::from($buffer); diff -up ./src/TextUI/Configuration/Xml/SchemaFinder.php.rpm ./src/TextUI/Configuration/Xml/SchemaFinder.php ---- ./src/TextUI/Configuration/Xml/SchemaFinder.php.rpm 2024-03-21 10:34:01.000000000 +0100 -+++ ./src/TextUI/Configuration/Xml/SchemaFinder.php 2024-03-21 14:02:24.893294091 +0100 -@@ -75,6 +75,6 @@ final class SchemaFinder +--- ./src/TextUI/Configuration/Xml/SchemaFinder.php.rpm 2024-10-28 16:44:45.000000000 +0100 ++++ ./src/TextUI/Configuration/Xml/SchemaFinder.php 2024-10-28 16:48:35.645635304 +0100 +@@ -77,6 +77,6 @@ final class SchemaFinder return __PHPUNIT_PHAR_ROOT__ . '/'; } @@ -98,8 +100,8 @@ diff -up ./src/TextUI/Configuration/Xml/SchemaFinder.php.rpm ./src/TextUI/Config } } diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2024-03-21 10:34:01.000000000 +0100 -+++ ./tests/bootstrap.php 2024-03-21 14:02:24.893294091 +0100 +--- ./tests/bootstrap.php.rpm 2024-10-28 16:44:45.000000000 +0100 ++++ ./tests/bootstrap.php 2024-10-28 16:48:36.312661377 +0100 @@ -11,8 +11,8 @@ if (!defined('TEST_FILES_PATH')) { define('TEST_FILES_PATH', __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR); } @@ -129,3 +131,31 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php } if ($phar) { +diff -up ./tests/unit/TextUI/Command/Commands/VersionCheckCommandTest.php.rpm ./tests/unit/TextUI/Command/Commands/VersionCheckCommandTest.php +--- ./tests/unit/TextUI/Command/Commands/VersionCheckCommandTest.php.rpm 2024-10-28 16:44:45.000000000 +0100 ++++ ./tests/unit/TextUI/Command/Commands/VersionCheckCommandTest.php 2024-10-28 16:48:35.645635304 +0100 +@@ -35,8 +35,9 @@ final class VersionCheckCommandTest exte + '10.5.0', + ], + [ +- 'You are not using the latest version of PHPUnit.' . PHP_EOL . ++ 'You are not using the latest version of PHPUnit.' . PHP_EOL . PHP_EOL . + 'The latest version compatible with PHPUnit 10.5.0 is PHPUnit 10.5.1.' . PHP_EOL . ++ 'Try a system update for new phpunit10 package.' . PHP_EOL . PHP_EOL . + 'The latest version is PHPUnit 10.5.1.' . PHP_EOL, + 10, + '10.5.0', +@@ -44,9 +45,11 @@ final class VersionCheckCommandTest exte + '10.5.1', + ], + [ +- 'You are not using the latest version of PHPUnit.' . PHP_EOL . ++ 'You are not using the latest version of PHPUnit.' . PHP_EOL . PHP_EOL . + 'The latest version compatible with PHPUnit 10.5.0 is PHPUnit 10.5.1.' . PHP_EOL . +- 'The latest version is PHPUnit 11.0.0.' . PHP_EOL, ++ 'Try a system update for new phpunit10 package.' . PHP_EOL . PHP_EOL . ++ 'The latest version is PHPUnit 11.0.0.' . PHP_EOL . ++ 'Try to install and use the phpunit11 command.' . PHP_EOL . PHP_EOL, + 10, + '10.5.0', + '11.0.0', -- cgit