summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-28 16:59:15 +0100
committerRemi Collet <remi@php.net>2024-10-28 16:59:15 +0100
commit017464162e290c8d565eef35e192664340207d67 (patch)
tree5502d45ac3e2c6eda6736f7636b9749909b05531
parent8202a8a8b8a09dcca04e91c96d61f87aa8bdfaf0 (diff)
update to 10.5.38
-rw-r--r--phpunit10-rpm.patch76
-rw-r--r--phpunit10.spec11
2 files changed, 60 insertions, 27 deletions
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',
diff --git a/phpunit10.spec b/phpunit10.spec
index 9f26878..252cc98 100644
--- a/phpunit10.spec
+++ b/phpunit10.spec
@@ -20,8 +20,8 @@
%bcond_with defcmd
%endif
-%global gh_commit c7cffa0efa2b70c22366523e6d804c9419eb2400
-%global gh_date 2024-10-21
+%global gh_commit a86773b9e887a67bc53efa9da9ad6e3f2498c132
+%global gh_date 2024-10-28
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project phpunit
@@ -34,7 +34,7 @@
%global ver_major 10
%global ver_minor 5
-%global upstream_version 10.5.37
+%global upstream_version 10.5.38
#global upstream_prever dev
Name: %{pk_project}%{ver_major}
@@ -173,7 +173,7 @@ Documentation: https://phpunit.readthedocs.io/
%setup -q -n %{gh_project}-%{gh_commit}
%patch -P0 -p0 -b .rpm
-find . -name \*.rpm -delete -print
+#find . -name \*.rpm -delete -print
%build
@@ -274,6 +274,9 @@ exit $ret
%changelog
+* Mon Oct 28 2024 Remi Collet <remi@remirepo.net> - 10.5.38-1
+- update to 10.5.38
+
* Mon Oct 21 2024 Remi Collet <remi@remirepo.net> - 10.5.37-1
- update to 10.5.37
- raise dependency on sebastian/comparator 5.0.3