diff --git a/.gitignore b/.gitignore index b2ecda5..63ff9d6 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,11 @@ /phpunit9-9.6.8-17d621b.tgz /phpunit9-9.6.9-a9aceaf.tgz /phpunit9-9.6.10-a6d3516.tgz +/phpunit9-9.6.11-810500e.tgz +/phpunit9-9.6.12-a122c2e.tgz +/phpunit9-9.6.13-f3d767f.tgz +/phpunit9-9.6.14-43653e6.tgz +/phpunit9-9.6.15-05017b8.tgz +/phpunit9-9.6.16-3767b2c.tgz +/phpunit9-9.6.17-1a15698.tgz +/phpunit9-9.6.18-32c2c2d.tgz diff --git a/makesrc.sh b/makesrc.sh index 3580b58..c85b319 100755 --- a/makesrc.sh +++ b/makesrc.sh @@ -1,24 +1,27 @@ #!/bin/bash NAME=$(basename $PWD) +DATE=$(sed -n '/^%global gh_date/{s/.* //;p}' $NAME.spec) OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) VERSION=$(sed -n '/^%global upstream_version/{s/.* //;p}' $NAME.spec) COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) SHORT=${COMMIT:0:7} +DATE=$(date -d "$DATE -4 days" +%Y-%m-%d) + if [ -f $NAME-$VERSION-$SHORT.tgz ]; then echo "$NAME-$VERSION-$SHORT.tgz already there" else - echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Date=$DATE\n" echo "Cloning..." rm -rf $PROJECT-$COMMIT - git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT || exit 1 echo "Getting commit..." pushd $PROJECT-$COMMIT - git checkout $COMMIT || exit1 + git checkout $COMMIT || exit 1 cp composer.json ../composer.json popd 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 27c8a40..0cff5be 100644 --- a/phpunit9.spec +++ b/phpunit9.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for phpunit9 # -# Copyright (c) 2010-2023 Remi Collet +# Copyright (c) 2010-2024 Remi Collet # # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ @@ -8,11 +8,9 @@ # Please, preserve the changelog entries # -# For compatibility with SCL -%undefine __brp_mangle_shebangs -%global gh_commit a6d351645c3fe5a30f5e86be6577d946af65a328 -#global gh_date 20150927 +%global gh_commit 32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04 +%global gh_date 2024-03-21 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project phpunit @@ -25,7 +23,7 @@ %global ver_major 9 %global ver_minor 6 -%global upstream_version 9.6.10 +%global upstream_version 9.6.18 #global upstream_prever dev Name: %{pk_project}%{ver_major} @@ -85,7 +83,7 @@ BuildRequires: php-fedora-autoloader-devel >= 1.0.0 # "myclabs/deep-copy": "^1.10.1", # "phar-io/manifest": "^2.0.3", # "phar-io/version": "^3.0.2", -# "phpunit/php-code-coverage": "^9.2.13", +# "phpunit/php-code-coverage": "^9.2.28", # "phpunit/php-file-iterator": "^3.0.5", # "phpunit/php-invoker": "^3.1.1", # "phpunit/php-text-template": "^2.0.3", @@ -114,7 +112,7 @@ Requires: (php-composer(myclabs/deep-copy) >= 1.10.1 with php-c Requires: (php-composer(phar-io/manifest) >= 2.0.3 with php-composer(phar-io/manifest) < 3) Requires: (php-composer(phar-io/version) >= 3.0.2 with php-composer(phar-io/version) < 4) Requires: (php-composer(phpspec/prophecy) >= 1.12.1 with php-composer(phpspec/prophecy) < 2) -Requires: (php-composer(phpunit/php-code-coverage) >= 9.2.13 with php-composer(phpunit/php-code-coverage) < 10) +Requires: (php-composer(phpunit/php-code-coverage) >= 9.2.28 with php-composer(phpunit/php-code-coverage) < 10) Requires: (php-composer(phpunit/php-file-iterator) >= 3.0.4 with php-composer(phpunit/php-file-iterator) < 4) Requires: (php-composer(phpunit/php-invoker) >= 3.1 with php-composer(phpunit/php-invoker) < 4) Requires: (php-composer(phpunit/php-text-template) >= 2.0.2 with php-composer(phpunit/php-text-template) < 3) @@ -137,6 +135,10 @@ Suggests: php-soap Suggests: php-xdebug # recommends latest versions Recommends: phpunit10 +# Fedora 38+ only until 8.1 EOL +%if 0%{?fedora} >= 38 +Recommends: phpunit11 +%endif # Autoloader Requires: php-composer(fedora/autoloader) # From phpcompatinfo report for version 8.0.0 @@ -187,7 +189,6 @@ if (PHP_VERSION_ID > 80100) { '%{php_home}/SebastianBergmann/Template2/autoload.php', '%{php_home}/SebastianBergmann/Timer5/autoload.php', $inst, - '%{php_home}/Prophecy/autoload.php', '%{php_home}/SebastianBergmann/CliParser/autoload.php', '%{php_home}/SebastianBergmann/CodeUnit/autoload.php', '%{php_home}/SebastianBergmann/Invoker3/autoload.php', @@ -204,6 +205,8 @@ if (PHP_VERSION_ID > 80100) { '%{php_home}/PharIo/Manifest2/autoload.php', '%{php_home}/PharIo/Version3/autoload.php', __DIR__ . '/Framework/Assert/Functions.php', + // May load Comparator/RecursionContext bad version + '%{php_home}/Prophecy/autoload.php', ]); // Extensions \Fedora\Autoloader\Dependencies::optional( @@ -237,7 +240,7 @@ sed -e 's:@PATH@:%{buildroot}%{php_home}/%{ns_vendor}:' -i tests/bootstrap.php sed -e 's:%{php_home}/%{ns_vendor}:%{buildroot}%{php_home}/%{ns_vendor}:' -i phpunit ret=0 -for cmd in php php80 php81 php82; do +for cmd in php php81 php82 php83; do if which $cmd; then $cmd ./phpunit $OPT --verbose || ret=1 fi @@ -254,6 +257,25 @@ exit $ret %changelog +* Thu Mar 21 2024 Remi Collet - 9.6.18-1 +- update to 9.6.18 + +* Mon Feb 26 2024 Remi Collet - 9.6.17-1 +- update to 9.6.17 + +* Fri Jan 19 2024 Remi Collet - 9.6.16-1 +- update to 9.6.16 + +* Tue Sep 19 2023 Remi Collet - 9.6.13-1 +- update to 9.6.13 + +* Wed Sep 13 2023 Remi Collet - 9.6.12-1 +- update to 9.6.12 +- raise dependency on phpunit/php-code-coverage 9.2.28 + +* Sun Aug 20 2023 Remi Collet - 9.6.11-1 +- update to 9.6.11 + * Mon Jul 10 2023 Remi Collet - 9.6.10-1 - update to 9.6.10 diff --git a/sources b/sources index 1f32953..1e7ea3e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (phpunit9-9.6.10-a6d3516.tgz) = 63ac6facc5082dfee7f02ca3c25d3ec107f12cebf52a05cea09dc1175f4ef172a4de2ec44ffc11458f5d72806c0409f702c9c592ae05542825a13a3275eaee80 +SHA512 (phpunit9-9.6.18-32c2c2d.tgz) = fd507fcc71ae2a927515dd2c088fe3714ca6d83bf97568d81e9f5334aa1cc2f205a09eeb02da33d6d1f222ab145c472664264bfaf80bbf67eaf555d1294fe529