diff options
author | Remi Collet <remi@remirepo.net> | 2024-03-06 10:27:27 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-03-06 10:27:27 +0100 |
commit | cd4d4784d564cfeddfa83d09e22b78f8a233b75d (patch) | |
tree | 0fe779e8089e3ef9d66af027974bef1f633da142 | |
parent | c8cdcf06ee5ebf7c745191f6ce8e148d0097a220 (diff) |
improve --check-version for RPM
-rw-r--r-- | phpunit10-rpm.patch | 42 | ||||
-rw-r--r-- | phpunit10.spec | 5 |
2 files changed, 39 insertions, 8 deletions
diff --git a/phpunit10-rpm.patch b/phpunit10-rpm.patch index 9ddfc8c..ac79d54 100644 --- a/phpunit10-rpm.patch +++ b/phpunit10-rpm.patch @@ -1,6 +1,6 @@ diff -up ./phpunit.rpm ./phpunit ---- ./phpunit.rpm 2024-01-15 07:31:36.850034357 +0100 -+++ ./phpunit 2024-01-15 07:33:02.306130486 +0100 +--- ./phpunit.rpm 2024-02-26 09:36:05.000000000 +0100 ++++ ./phpunit 2024-03-06 10:22:28.176494758 +0100 @@ -46,27 +46,13 @@ if (isset($GLOBALS['_composer_autoload_p define('PHPUNIT_COMPOSER_INSTALL', $GLOBALS['_composer_autoload_path']); @@ -49,10 +49,38 @@ diff -up ./phpunit.rpm ./phpunit + // PHPUnit v6 to v9 + 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-06 10:23:20.003477445 +0100 ++++ ./src/TextUI/Command/Commands/VersionCheckCommand.php 2024-03-06 10:24:42.157620333 +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(), '>'); +@@ -43,6 +43,7 @@ final class VersionCheckCommand implemen + Version::id(), + $latestCompatibleVersion, + ); ++ $buffer .= sprintf('Try a system update for new phpunit%s package.' . PHP_EOL, $major); + } + + if ($notLatest) { +@@ -50,6 +51,7 @@ 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, 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-01-15 07:25:40.000000000 +0100 -+++ ./src/TextUI/Configuration/Xml/SchemaFinder.php 2024-01-15 07:31:36.850034357 +0100 -@@ -48,6 +48,6 @@ final class SchemaFinder +--- ./src/TextUI/Configuration/Xml/SchemaFinder.php.rpm 2024-02-26 09:36:05.000000000 +0100 ++++ ./src/TextUI/Configuration/Xml/SchemaFinder.php 2024-03-06 10:22:28.177494796 +0100 +@@ -75,6 +75,6 @@ final class SchemaFinder return __PHPUNIT_PHAR_ROOT__ . '/'; } @@ -61,8 +89,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-01-15 07:25:39.000000000 +0100 -+++ ./tests/bootstrap.php 2024-01-15 07:31:36.851034393 +0100 +--- ./tests/bootstrap.php.rpm 2024-02-26 09:36:05.000000000 +0100 ++++ ./tests/bootstrap.php 2024-03-06 10:22:28.177494796 +0100 @@ -11,8 +11,8 @@ if (!defined('TEST_FILES_PATH')) { define('TEST_FILES_PATH', __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR); } diff --git a/phpunit10.spec b/phpunit10.spec index 90880d4..20a7e74 100644 --- a/phpunit10.spec +++ b/phpunit10.spec @@ -39,7 +39,7 @@ Name: %{pk_project}%{ver_major} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: The PHP Unit Testing framework version %{ver_major} License: BSD-3-Clause @@ -322,6 +322,9 @@ exit $ret %changelog +* Wed Mar 6 2024 Remi Collet <remi@remirepo.net> - 10.5.11-2 +- improve --check-version for RPM + * Mon Feb 26 2024 Remi Collet <remi@remirepo.net> - 10.5.11-1 - update to 10.5.11 |