From df1895cef53e0e66d35bd5c2b25dbb99324e0687 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 09:32:04 +0000 Subject: [PATCH 1/4] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- php-phpspec-prophecy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index f9f7c5c..cdbd48f 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -16,7 +16,7 @@ Name: php-phpspec-prophecy Version: 1.20.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -176,6 +176,9 @@ exit $ret %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 1.20.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Nov 21 2024 Remi Collet - 1.20.0-1 - update to 1.20.0 From 4e02ea1a8dfae2b8bcea0aefac34212a31c21476 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 30 Apr 2025 07:36:54 +0200 Subject: [PATCH 2/4] update to 1.22.0 re-license spec file to CECILL-2.1 --- .gitignore | 1 + php-phpspec-prophecy.spec | 59 ++++++++++++++++++++++++++++----------- sources | 2 +- 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index e1ca525..4083ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ clog /php-phpspec-prophecy-1.18.0-d4f454f.tgz /php-phpspec-prophecy-1.19.0-67a759e.tgz /php-phpspec-prophecy-1.20.0-a0165c6.tgz +/php-phpspec-prophecy-1.22.0-35f1adb.tgz diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index cdbd48f..d875f13 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -1,12 +1,12 @@ # remirepo/fedora spec file for php-phpspec-prophecy # -# Copyright (c) 2015-2024 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2015-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # -%global gh_commit a0165c648cab6a80311c74ffc708a07bb53ecc93 +%global gh_commit 35f1adb388946d92e6edab2aa2cb2b60e132ebd5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -15,8 +15,8 @@ %bcond_with phpspec Name: php-phpspec-prophecy -Version: 1.20.0 -Release: 2%{?dist} +Version: 1.22.0 +Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -25,16 +25,16 @@ Source0: %{name}-%{version}-%{gh_short}.tgz Source2: makesrc.sh BuildArch: noarch -BuildRequires: php(language) >= 7.2 +BuildRequires: php(language) >= 7.4 %if %{with tests} BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 5.2 with php-composer(phpdocumentor/reflection-docblock) < 6) -BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 7) -BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 7) +BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 8) +BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 8) BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # from composer.json, "require-dev": { # "friendsofphp/php-cs-fixer": "^3.40", # "phpspec/phpspec": "^6.0 || ^7.0" -# "phpstan/phpstan": "^1.9", +# "phpstan/phpstan": "^2.1.13", # "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" %if %{with phpspec} BuildRequires: php-composer(phpspec/phpspec) >= 6.0 @@ -42,20 +42,22 @@ BuildRequires: php-composer(phpspec/phpspec) >= 6.0 BuildRequires: phpunit8 BuildRequires: phpunit9 BuildRequires: phpunit10 +BuildRequires: phpunit11 +BuildRequires: phpunit12 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { -# "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.* || 8.4.*", +# "php": "^7.4 || 8.0.* || 8.1.* || 8.2.* || 8.3.* || 8.4.*", # "phpdocumentor/reflection-docblock": "^5.2", -# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", +# "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", # "doctrine/instantiator": "^1.2 || ^2.0", -# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" -Requires: php(language) >= 7.2 +# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" +Requires: php(language) >= 7.4 Requires: (php-composer(phpdocumentor/reflection-docblock) >= 5.2 with php-composer(phpdocumentor/reflection-docblock) < 6) -Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 7) -Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 7) +Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 8) +Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 8) Requires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # From phpcompatinfo report for version 1.11.0 Requires: php-pcre @@ -102,6 +104,9 @@ if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from php if (PHP_VERSION_ID > 80200) { array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator6/autoload.php'); } + if (PHP_VERSION_ID > 80300) { + array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator7/autoload.php'); + } \Fedora\Autoloader\Dependencies::required([$inst]); } if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from phpunit, v1 from phpspec @@ -115,6 +120,9 @@ if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from if (PHP_VERSION_ID > 80200) { array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext6/autoload.php'); } + if (PHP_VERSION_ID > 80300) { + array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext7/autoload.php'); + } \Fedora\Autoloader\Dependencies::required([$inst]); } EOF @@ -162,6 +170,21 @@ for cmd in php php81 php82 php83 php84; do || ret=1 fi done +for cmd in php php82 php83 php84; do + if which $cmd; then + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit11 \ + || ret=1 + fi +done +# Not ready see https://github.com/phpspec/prophecy/issues/640 +for cmd in php php83 php84; do + if which $cmd; then + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit12 \ + || ignore=1 + fi +done exit $ret %else : Test suite disabled @@ -176,6 +199,10 @@ exit $ret %changelog +* Wed Apr 30 2025 Remi Collet - 1.22.0-1 +- update to 1.22.0 +- re-license spec file to CECILL-2.1 + * Sat Jan 18 2025 Fedora Release Engineering - 1.20.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 6124729..77767c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.20.0-a0165c6.tgz) = 24d33496fd2df4eb12700a9ece30158ececf8a3396e1df8a83bb767e38c65f66892b7997e7dd7700284925b3b88d1a6d2af3edb80b8bbdab8fd48351d87db89a +SHA512 (php-phpspec-prophecy-1.22.0-35f1adb.tgz) = abb30711891203c294676e73919231d77bb7c83822e936adeaa26abd8fe9a4374b32cb0c3a9d9c334c5db5e21be7e0e8e14e67f920104289847380799f5a8a22 From 1df7abefca2b153a38f36dd8eaa76388302fa713 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 05:26:08 +0000 Subject: [PATCH 3/4] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- php-phpspec-prophecy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index d875f13..1bd47eb 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -16,7 +16,7 @@ Name: php-phpspec-prophecy Version: 1.22.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -199,6 +199,9 @@ exit $ret %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.22.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Apr 30 2025 Remi Collet - 1.22.0-1 - update to 1.22.0 - re-license spec file to CECILL-2.1 From d43b6eef38425b35c8048406fe269a60c7804629 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 12 Jan 2026 09:46:09 +0100 Subject: [PATCH 4/4] update to 1.24.0 use doctrine/instantiator v2 only with PHP 8.4+ raise dependency on PHP 8.2 --- .gitignore | 1 + php-phpspec-prophecy.spec | 93 +++++++++++++++++---------------------- sources | 2 +- 3 files changed, 42 insertions(+), 54 deletions(-) diff --git a/.gitignore b/.gitignore index 4083ba2..1255b50 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ clog /php-phpspec-prophecy-1.19.0-67a759e.tgz /php-phpspec-prophecy-1.20.0-a0165c6.tgz /php-phpspec-prophecy-1.22.0-35f1adb.tgz +/php-phpspec-prophecy-1.24.0-a24f1bd.tgz diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 1bd47eb..7d1bcb3 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -1,12 +1,12 @@ # remirepo/fedora spec file for php-phpspec-prophecy # -# SPDX-FileCopyrightText: Copyright 2015-2025 Remi Collet +# SPDX-FileCopyrightText: Copyright 2015-2026 Remi Collet # SPDX-License-Identifier: CECILL-2.1 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # -%global gh_commit 35f1adb388946d92e6edab2aa2cb2b60e132ebd5 +%global gh_commit a24f1bda2d00a03877f7f99d9e6b150baf543f6d %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -15,7 +15,7 @@ %bcond_with phpspec Name: php-phpspec-prophecy -Version: 1.22.0 +Version: 1.24.0 Release: 2%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -25,23 +25,20 @@ Source0: %{name}-%{version}-%{gh_short}.tgz Source2: makesrc.sh BuildArch: noarch -BuildRequires: php(language) >= 7.4 +BuildRequires: php(language) >= 8.2 %if %{with tests} BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 5.2 with php-composer(phpdocumentor/reflection-docblock) < 6) BuildRequires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 8) BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 8) BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # from composer.json, "require-dev": { -# "friendsofphp/php-cs-fixer": "^3.40", -# "phpspec/phpspec": "^6.0 || ^7.0" +# "friendsofphp/php-cs-fixer": "^3.88", +# "phpspec/phpspec": "^6.0 || ^7.0 || ^8.0", # "phpstan/phpstan": "^2.1.13", -# "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" +# "phpunit/phpunit": "^11.0 || ^12.0" %if %{with phpspec} BuildRequires: php-composer(phpspec/phpspec) >= 6.0 %endif -BuildRequires: phpunit8 -BuildRequires: phpunit9 -BuildRequires: phpunit10 BuildRequires: phpunit11 BuildRequires: phpunit12 %endif @@ -49,20 +46,19 @@ BuildRequires: phpunit12 BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { -# "php": "^7.4 || 8.0.* || 8.1.* || 8.2.* || 8.3.* || 8.4.*", +# "php": "8.2.* || 8.3.* || 8.4.*", # "phpdocumentor/reflection-docblock": "^5.2", # "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", # "doctrine/instantiator": "^1.2 || ^2.0", -# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" -Requires: php(language) >= 7.4 +# "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", +# "symfony/deprecation-contracts": "^2.5 || ^3.1" +Requires: php(language) >= 8.2 Requires: (php-composer(phpdocumentor/reflection-docblock) >= 5.2 with php-composer(phpdocumentor/reflection-docblock) < 6) Requires: (php-composer(sebastian/comparator) >= 3.0 with php-composer(sebastian/comparator) < 8) Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 8) Requires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # From phpcompatinfo report for version 1.11.0 -Requires: php-pcre -Requires: php-reflection -Requires: php-spl +# only pcre, reflection and spl # Autoloader Requires: php-composer(fedora/autoloader) @@ -85,9 +81,13 @@ to be used inside any testing framework out there with minimal effort. phpab --template fedora --output src/Prophecy/autoload.php src cat << 'EOF' | tee -a src/Prophecy/autoload.php -$inst = ['%{_datadir}/php/Doctrine/Instantiator/autoload.php']; -if (PHP_VERSION_ID > 80100) { - array_unshift($inst, '%{_datadir}/php/Doctrine/Instantiator2/autoload.php'); +if (PHP_VERSION_ID > 80400) { + $inst = [ + '%{_datadir}/php/Doctrine/Instantiator2/autoload.php', + '%{_datadir}/php/Doctrine/Instantiator/autoload.php', + ]; +} else { + $inst = '%{_datadir}/php/Doctrine/Instantiator/autoload.php'; } \Fedora\Autoloader\Dependencies::required([ $inst, @@ -95,15 +95,11 @@ if (PHP_VERSION_ID > 80100) { ]); if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec $inst = [ + '%{_datadir}/php/SebastianBergmann/Comparator6/autoload.php', + '%{_datadir}/php/SebastianBergmann/Comparator5/autoload.php', '%{_datadir}/php/SebastianBergmann/Comparator4/autoload.php', '%{_datadir}/php/SebastianBergmann/Comparator3/autoload.php', ]; - if (PHP_VERSION_ID > 80100) { - array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator5/autoload.php'); - } - if (PHP_VERSION_ID > 80200) { - array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator6/autoload.php'); - } if (PHP_VERSION_ID > 80300) { array_unshift($inst, '%{_datadir}/php/SebastianBergmann/Comparator7/autoload.php'); } @@ -111,20 +107,23 @@ if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from php } if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from phpunit, v1 from phpspec $inst = [ + '%{_datadir}/php/SebastianBergmann/RecursionContext6/autoload.php', + '%{_datadir}/php/SebastianBergmann/RecursionContext5/autoload.php', '%{_datadir}/php/SebastianBergmann/RecursionContext4/autoload.php', '%{_datadir}/php/SebastianBergmann/RecursionContext3/autoload.php', ]; - if (PHP_VERSION_ID > 80100) { - array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext5/autoload.php'); - } - if (PHP_VERSION_ID > 80200) { - array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext6/autoload.php'); - } if (PHP_VERSION_ID > 80300) { array_unshift($inst, '%{_datadir}/php/SebastianBergmann/RecursionContext7/autoload.php'); } \Fedora\Autoloader\Dependencies::required([$inst]); } +// from https://github.com/symfony/deprecation-contracts +if (!function_exists('trigger_deprecation')) { + function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void + { + @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); + } +} EOF @@ -152,39 +151,22 @@ phpspec --version %endif ret=0 -# ignore it_can_not_double_an_enum on all version. Not ready -for cmd in php php81 php82 php83 php84; do - if which $cmd; then -%if %{with phpspec} - $cmd -d auto_prepend_file=vendor/autoload.php \ - %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 -%endif - $cmd -d auto_prepend_file=vendor/autoload.php \ - %{_bindir}/phpunit8 \ - || ret=1 - $cmd -d auto_prepend_file=vendor/autoload.php \ - %{_bindir}/phpunit9 \ - || ret=1 - $cmd -d auto_prepend_file=vendor/autoload.php \ - %{_bindir}/phpunit10 \ - || ret=1 - fi -done -for cmd in php php82 php83 php84; do +for cmd in php php82 php83 php84 php85; do if which $cmd; then $cmd -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpunit11 \ || ret=1 fi done -# Not ready see https://github.com/phpspec/prophecy/issues/640 -for cmd in php php83 php84; do +if [ -x %{_bindir}/phpunit12 ]; then +for cmd in php php83 php84 php85; do if which $cmd; then $cmd -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpunit12 \ - || ignore=1 + || ret=1 fi done +fi exit $ret %else : Test suite disabled @@ -199,6 +181,11 @@ exit $ret %changelog +* Mon Jan 12 2026 Remi Collet - 1.24.0-2 +- update to 1.24.0 +- use doctrine/instantiator v2 only with PHP 8.4+ +- raise dependency on PHP 8.2 + * Fri Jul 25 2025 Fedora Release Engineering - 1.22.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 77767c2..c5a1dbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.22.0-35f1adb.tgz) = abb30711891203c294676e73919231d77bb7c83822e936adeaa26abd8fe9a4374b32cb0c3a9d9c334c5db5e21be7e0e8e14e67f920104289847380799f5a8a22 +SHA512 (php-phpspec-prophecy-1.24.0-a24f1bd.tgz) = 1fb41f8835788bb06c4ec0ae67460f80370d0466a0036368ce5822750a3544ba306a3660011b95b127276695027cd099bcd85259e4d1faeff36caa11dd4610de