summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpunit9-rpm.patch46
-rw-r--r--phpunit9.spec5
2 files changed, 41 insertions, 10 deletions
diff --git a/phpunit9-rpm.patch b/phpunit9-rpm.patch
index be09111..e9698bf 100644
--- a/phpunit9-rpm.patch
+++ b/phpunit9-rpm.patch
@@ -1,7 +1,7 @@
diff -up ./phpunit.rpm ./phpunit
---- ./phpunit.rpm 2021-12-30 09:04:15.000000000 +0100
-+++ ./phpunit 2021-12-30 09:05:07.774778660 +0100
-@@ -62,27 +62,11 @@ if (isset($GLOBALS['_composer_autoload_p
+--- ./phpunit.rpm 2024-02-26 09:34:48.000000000 +0100
++++ ./phpunit 2024-03-06 10:19:22.109376592 +0100
+@@ -71,27 +71,11 @@ if (isset($GLOBALS['_composer_autoload_p
define('PHPUNIT_COMPOSER_INSTALL', $GLOBALS['_composer_autoload_path']);
unset($GLOBALS['_composer_autoload_path']);
@@ -33,7 +33,7 @@ diff -up ./phpunit.rpm ./phpunit
}
$options = getopt('', array('prepend:'));
-@@ -95,4 +79,13 @@ unset($options);
+@@ -104,4 +88,13 @@ unset($options);
require PHPUNIT_COMPOSER_INSTALL;
@@ -48,10 +48,38 @@ diff -up ./phpunit.rpm ./phpunit
+ // PHPUnit v6 to v9
+ PHPUnit\TextUI\Command::main();
+}
+diff -up ./src/TextUI/Command.php.rpm ./src/TextUI/Command.php
+--- ./src/TextUI/Command.php.rpm 2024-03-06 10:19:26.914560422 +0100
++++ ./src/TextUI/Command.php 2024-03-06 10:19:32.787785106 +0100
+@@ -600,7 +600,7 @@ class Command
+ $this->printVersionString();
+
+ $latestVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit');
+- $latestCompatibleVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit-' . explode('.', Version::series())[0]);
++ $latestCompatibleVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit-' . $major=explode('.', Version::series())[0]);
+
+ $notLatest = version_compare($latestVersion, Version::id(), '>');
+ $notLatestCompatible = version_compare($latestCompatibleVersion, Version::id(), '>');
+@@ -617,6 +617,7 @@ class Command
+ Version::id(),
+ $latestCompatibleVersion,
+ );
++ printf('Try a system update for new phpunit%s package.' . PHP_EOL, $major);
+ }
+
+ if ($notLatest) {
+@@ -624,6 +625,7 @@ class Command
+ 'The latest version is PHPUnit %s.' . PHP_EOL,
+ $latestVersion,
+ );
++ printf('Try to install and use the phpunit%s command.' . PHP_EOL, explode('.', $latestVersion)[0]);
+ }
+
+ exit(TestRunner::SUCCESS_EXIT);
diff -up ./src/Util/Xml/SchemaFinder.php.rpm ./src/Util/Xml/SchemaFinder.php
---- ./src/Util/Xml/SchemaFinder.php.rpm 2021-12-30 09:04:15.000000000 +0100
-+++ ./src/Util/Xml/SchemaFinder.php 2021-12-30 09:04:21.186910890 +0100
-@@ -48,6 +48,6 @@ final class SchemaFinder
+--- ./src/Util/Xml/SchemaFinder.php.rpm 2024-02-26 09:34:48.000000000 +0100
++++ ./src/Util/Xml/SchemaFinder.php 2024-03-06 10:19:22.109376592 +0100
+@@ -75,6 +75,6 @@ final class SchemaFinder
return __PHPUNIT_PHAR_ROOT__ . '/';
}
@@ -60,8 +88,8 @@ diff -up ./src/Util/Xml/SchemaFinder.php.rpm ./src/Util/Xml/SchemaFinder.php
}
}
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
---- ./tests/bootstrap.php.rpm 2021-12-30 09:04:15.000000000 +0100
-+++ ./tests/bootstrap.php 2021-12-30 09:04:21.186910890 +0100
+--- ./tests/bootstrap.php.rpm 2024-02-26 09:34:48.000000000 +0100
++++ ./tests/bootstrap.php 2024-03-06 10:19:22.109376592 +0100
@@ -9,8 +9,8 @@
*/
const TEST_FILES_PATH = __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR;
diff --git a/phpunit9.spec b/phpunit9.spec
index c76fd9c..90b0af3 100644
--- a/phpunit9.spec
+++ b/phpunit9.spec
@@ -31,7 +31,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
@@ -319,6 +319,9 @@ exit $ret
%changelog
+* Wed Mar 6 2024 Remi Collet <remi@remirepo.net> - 9.6.17-2
+- improve --check-version for RPM
+
* Mon Feb 26 2024 Remi Collet <remi@remirepo.net> - 9.6.17-1
- update to 9.6.17