diff --git a/.gitignore b/.gitignore index 704c7be..1255b50 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,28 @@ clog /php-phpspec-prophecy-1.7.1-15ea9ac.tgz /php-phpspec-prophecy-1.7.2-c9b8c60.tgz /php-phpspec-prophecy-1.7.3-e4ed002.tgz +/php-phpspec-prophecy-1.7.4-9f901e2.tgz +/php-phpspec-prophecy.spec +/php-phpspec-prophecy-1.7.5-dfd6be4.tgz +/php-phpspec-prophecy-1.7.6-33a7e3c.tgz +/php-phpspec-prophecy-1.8.0-4ba436b.tgz +/php-phpspec-prophecy-1.8.1-1927e75.tgz +/php-phpspec-prophecy-1.9.0-f6811d9.tgz +/php-phpspec-prophecy-1.10.1-cbe1df6.tgz +/php-phpspec-prophecy-1.10.2-b4400ef.tgz +/php-phpspec-prophecy-1.10.3-451c3cd.tgz +/php-phpspec-prophecy-1.11.0-8ff0384.tgz +/php-phpspec-prophecy-1.11.1-b20034b.tgz +/php-phpspec-prophecy-1.12.0-765cd5d.tgz +/php-phpspec-prophecy-1.12.1-8ce8751.tgz +/php-phpspec-prophecy-1.12.2-245710e.tgz +/php-phpspec-prophecy-1.13.0-be1996e.tgz +/php-phpspec-prophecy-1.14.0-d86dfc2.tgz +/php-phpspec-prophecy-1.15.0-bbcd738.tgz +/php-phpspec-prophecy-1.16.0-be8cac5.tgz +/php-phpspec-prophecy-1.17.0-15873c6.tgz +/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 +/php-phpspec-prophecy-1.24.0-a24f1bd.tgz diff --git a/php-phpspec-prophecy-autoload.php b/php-phpspec-prophecy-autoload.php deleted file mode 100644 index 599ad20..0000000 --- a/php-phpspec-prophecy-autoload.php +++ /dev/null @@ -1,27 +0,0 @@ -= 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": { -# "phpspec/phpspec": "^2.5|^3.2" -# "phpunit/phpunit": "^4.8.35 || ^5.7" -BuildRequires: php-composer(phpspec/phpspec) >= 2.5 -# Autoloader -BuildRequires: php-composer(fedora/autoloader) +# "friendsofphp/php-cs-fixer": "^3.88", +# "phpspec/phpspec": "^6.0 || ^7.0 || ^8.0", +# "phpstan/phpstan": "^2.1.13", +# "phpunit/phpunit": "^11.0 || ^12.0" +%if %{with phpspec} +BuildRequires: php-composer(phpspec/phpspec) >= 6.0 %endif +BuildRequires: phpunit11 +BuildRequires: phpunit12 +%endif +# Autoloader +BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { -# "php": "^5.3|^7.0", -# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", -# "sebastian/comparator": "^1.1|^2.0", -# "doctrine/instantiator": "^1.0.2", -# "sebastian/recursion-context": "^1.0|^2.0|^3.0" -Requires: php(language) >= 5.3 -Requires: php-composer(phpdocumentor/reflection-docblock) >= 2.0 -# ignore v4 for now -Requires: php-composer(phpdocumentor/reflection-docblock) < 4 -Requires: php-composer(sebastian/comparator) >= 1.1 -Requires: php-composer(sebastian/comparator) < 3 -# recursion-context will be pulled by phpspec or phpunit or phpunit6 -#Requires: php-composer(sebastian/recursion-context) >= 1.0 -#Requires: php-composer(sebastian/recursion-context) < 4 -# use 1.0.4 to ensure we have the autoloader -Requires: php-composer(doctrine/instantiator) >= 1.0.4 -Requires: php-composer(doctrine/instantiator) < 2 -# From phpcompatinfo report for version 1.1.0 -Requires: php-pcre -Requires: php-reflection -Requires: php-spl +# "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", +# "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 +# only pcre, reflection and spl # Autoloader Requires: php-composer(fedora/autoloader) @@ -81,11 +76,55 @@ to be used inside any testing framework out there with minimal effort. %prep %setup -q -n %{gh_project}-%{gh_commit} -cp %{SOURCE1} src/Prophecy/autoload.php - %build -# Nothing +phpab --template fedora --output src/Prophecy/autoload.php src +cat << 'EOF' | tee -a src/Prophecy/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, + '%{_datadir}/php/phpDocumentor/Reflection/DocBlock5/autoload.php', +]); +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 > 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 + $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 > 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 %install @@ -94,21 +133,40 @@ cp -pr src/* %{buildroot}%{_datadir}/php %check -%if %{with_tests} +%if %{with tests} +: Dev autoloader +mkdir vendor +phpab --output vendor/autoload.php fixtures tests + +cat << 'EOF' | tee -a vendor/autoload.php +require_once '%{buildroot}%{_datadir}/php/Prophecy/autoload.php'; +EOF + +: check autoloader +php %{buildroot}%{_datadir}/php/Prophecy/autoload.php + +%if %{with phpspec} +: check phpspec phpspec --version -VER=$(phpspec --version | sed -n -e 's/.* //;s/\..*$//;p') -if [ $VER -ge 4 ]; then - : phpspec $VER is too recent - exit 0 -fi +%endif ret=0 -for cmd in php php70 php71 php72; do +for cmd in php php82 php83 php84 php85; do if which $cmd; then - $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ - %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 + $cmd -d auto_prepend_file=vendor/autoload.php \ + %{_bindir}/phpunit11 \ + || ret=1 fi done +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 \ + || ret=1 + fi +done +fi exit $ret %else : Test suite disabled @@ -116,7 +174,6 @@ exit $ret %files -%{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md %doc composer.json @@ -124,6 +181,155 @@ 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 + +* 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 + +* Thu Nov 21 2024 Remi Collet - 1.20.0-1 +- update to 1.20.0 + +* Fri Jul 19 2024 Fedora Release Engineering - 1.19.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Feb 29 2024 Remi Collet - 1.19.0-1 +- update to 1.19.0 +- allow doctrine/instantiator 6 +- allow sebastian/recursion-context 6 + +* Thu Jan 25 2024 Fedora Release Engineering - 1.18.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Dec 8 2023 Remi Collet - 1.18.0-1 +- update to 1.18.0 +- run test suite with phpunit8, phpunit9 and phpunit10 + +* Wed Sep 27 2023 Remi Collet - 1.17.0-4 +- disable phpspec tests + +* Fri Jul 21 2023 Fedora Release Engineering - 1.17.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Feb 3 2023 Remi Collet - 1.17.0-2 +- fix autoloader + +* Fri Feb 3 2023 Remi Collet - 1.17.0-1 +- update to 1.17.0 +- allow doctrine/instantiator v2 + +* Fri Jan 20 2023 Fedora Release Engineering - 1.16.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Dec 1 2022 Remi Collet - 1.16.0-1 +- update to 1.16.0 + +* Fri Jul 22 2022 Fedora Release Engineering - 1.15.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 1.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Dec 8 2021 Remi Collet - 1.15.0-1 +- update to 1.15.0 + +* Fri Sep 10 2021 Remi Collet - 1.14.0-1 +- update to 1.14.0 + +* Fri Jul 23 2021 Fedora Release Engineering - 1.13.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Mar 18 2021 Remi Collet - 1.13.0-1 +- update to 1.13.0 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.12.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Dec 21 2020 Remi Collet - 1.12.2-1 +- update to 1.12.2 +- switch to phpunit9 + +* Tue Sep 29 2020 Remi Collet - 1.12.1-1 +- update to 1.12.1 + +* Mon Sep 28 2020 Remi Collet - 1.12.0-2 +- switch to classmap autoloader + +* Mon Sep 28 2020 Remi Collet - 1.12.0-1 +- update to 1.12.0 +- raise dependency on phpdocumentor/reflection-docblock 5.2 + +* Tue Jul 28 2020 Fedora Release Engineering - 1.11.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 8 2020 Remi Collet - 1.11.1-1 +- update to 1.11.1 + +* Wed Jul 8 2020 Remi Collet - 1.11.0-1 +- update to 1.11.0 +- raise dependency on PHP 7.2 +- raise dependency on phpdocumentor/reflection-docblock 5.0 +- raise dependency on sebastian/comparator 3.0 +- raise dependency on doctrine/instantiator 1.2 +- raise dependency on sebastian/recursion-context 3.0 + +* Fri Mar 6 2020 Remi Collet - 1.10.3-1 +- update to 1.10.3 +- allow phpdocumentor/reflection-docblock 5.0 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.10.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 21 2020 Remi Collet - 1.10.2-1 +- update to 1.10.2 +- allow sebastian/comparator 4 and sebastian/recursion-context 4 + +* Fri Jan 3 2020 Remi Collet - 1.10.1-1 +- update to 1.10.1 + +* Fri Oct 4 2019 Remi Collet - 1.9.0-1 +- update to 1.9.0 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jun 13 2019 Remi Collet - 1.8.1-1 +- update to 1.8.1 + +* Sat Feb 02 2019 Fedora Release Engineering - 1.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Aug 20 2018 Remi Collet - 1.8.0-1 +- update to 1.8.0 + +* Fri Jul 13 2018 Fedora Release Engineering - 1.7.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Apr 19 2018 Remi Collet - 1.7.6-1 +- update to 1.7.6 + +* Tue Feb 20 2018 Remi Collet - 1.7.5-1 +- Update to 1.7.5 + +* Mon Feb 12 2018 Remi Collet - 1.7.4-1 +- Update to 1.7.4 +- use range dependency on F27+ + +* Fri Feb 09 2018 Fedora Release Engineering - 1.7.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Nov 27 2017 Remi Collet - 1.7.3-1 - Update to 1.7.3 diff --git a/sources b/sources index 292d426..c5a1dbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.7.3-e4ed002.tgz) = f2dd8f7162c400683c88acc9dc276291495e0d2bb4b486dc7c96219e23f22e8a08924c250d708ea5502c07aae6e157a3737628952c9e333dba143518330eb3b7 +SHA512 (php-phpspec-prophecy-1.24.0-a24f1bd.tgz) = 1fb41f8835788bb06c4ec0ae67460f80370d0466a0036368ce5822750a3544ba306a3660011b95b127276695027cd099bcd85259e4d1faeff36caa11dd4610de