From acf71e65338394ac7d24ab9974f261bbaf4c916a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Dec 2022 11:29:11 +0100 Subject: [PATCH 1/3] v1.16.0 (cherry picked from commit 9b8592c01f7f5ac743dbca6d925aa29b44b08acc) --- .gitignore | 1 + php-phpspec-prophecy.spec | 15 +++++++++------ sources | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index fce8034..2d2ec82 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ clog /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 diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 40720c0..a4f580c 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-2021 Remi Collet +# Copyright (c) 2015-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit bbcd7380b0ebf3961ee21409db7b38bc31d69a13 +%global gh_commit be8cac52a0827776ff9ccda8c381ac5b71aeb359 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -14,8 +14,8 @@ %bcond_without tests Name: php-phpspec-prophecy -Version: 1.15.0 -Release: 2%{?dist} +Version: 1.16.0 +Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -41,7 +41,7 @@ BuildRequires: %{phpunit} BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { -# "php": "^7.2 || ~8.0, <8.2", +# "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", # "phpdocumentor/reflection-docblock": "^5.2", # "sebastian/comparator": "^3.0|^4.0", # "doctrine/instantiator": "^1.2", @@ -123,7 +123,7 @@ phpspec --version ret=0 # ignore it_can_not_double_an_enum on all version. Not ready -for cmdarg in "php %{phpunit}" php74 php80 php81; do +for cmdarg in "php %{phpunit}" php80 php81 php82; do if which $cmdarg; then set $cmdarg $1 -d auto_prepend_file=vendor/autoload.php \ @@ -149,6 +149,9 @@ exit $ret %changelog +* Thu Dec 1 2022 Remi Collet - 1.16.0-1 +- update to 1.16.0 + * Fri Jan 21 2022 Fedora Release Engineering - 1.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 1b09358..966f96b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.15.0-bbcd738.tgz) = 64e3b6fbba82bc4fe3058320e3967fecd94e1a4bb088ba83f5cf68850ff8b8cee069fdc72281ed79a3d95486404250a3fcfb8c1a0843b621de7a22383c6ac5f3 +SHA512 (php-phpspec-prophecy-1.16.0-be8cac5.tgz) = fe41c3b1b7bcefe7bc7073977a022a8939dfedf4daf70a100f77abd4629f2dbc4bde93e39d160e4b68313e4e162f70a77b8cde66c2efac42ae024eb71e0242ee From 8826306b92f94659f4f1d811ecb842cccda3634f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 3 Feb 2023 08:56:21 +0100 Subject: [PATCH 2/3] update to 1.17.0 allow doctrine/instantiator v2 (cherry picked from commit 271eaeee09d8ae06d9556dfcecf9217e91266175) (cherry picked from commit d396308bdcb5ccf30255c5df05f70b913b4d5c67) --- .gitignore | 1 + php-phpspec-prophecy.spec | 26 +++++++++++++++++--------- sources | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 2d2ec82..22eba95 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ clog /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 diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index a4f580c..b35f84f 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-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2015-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit be8cac52a0827776ff9ccda8c381ac5b71aeb359 +%global gh_commit 15873c65b207b07765dbc3c95d20fdf4a320cbe2 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -14,7 +14,7 @@ %bcond_without tests Name: php-phpspec-prophecy -Version: 1.16.0 +Version: 1.17.0 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -29,9 +29,10 @@ BuildRequires: php(language) >= 7.2 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) < 5) BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 5) -BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 2) +BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 3) # from composer.json, "require-dev": { # "phpspec/phpspec": "^6.0 | ^7.0" +# "phpstan/phpstan": "^1.9", # "phpunit/phpunit": "^8.0 || ^9.0" BuildRequires: php-composer(phpspec/phpspec) >= 6.0 %global phpunit %{_bindir}/phpunit9 @@ -44,13 +45,13 @@ BuildRequires: php-fedora-autoloader-devel # "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", # "phpdocumentor/reflection-docblock": "^5.2", # "sebastian/comparator": "^3.0|^4.0", -# "doctrine/instantiator": "^1.2", +# "doctrine/instantiator": "^1.2 || ^2.0", # "sebastian/recursion-context": "^3.0|^4.0" Requires: php(language) >= 7.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) < 5) Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 5) -Requires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 2) +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 @@ -78,7 +79,10 @@ phpab --template fedora --output src/Prophecy/autoload.php src cat << 'EOF' | tee -a src/Prophecy/autoload.php \Fedora\Autoloader\Dependencies::required([ - '%{_datadir}/php/Doctrine/Instantiator/autoload.php', + [ + '%{_datadir}/php/Doctrine/Instantiator2/autoload.php', + '%{_datadir}/php/Doctrine/Instantiator/autoload.php', + ], '%{_datadir}/php/phpDocumentor/Reflection/DocBlock5/autoload.php', ]); if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec @@ -109,7 +113,7 @@ cp -pr src/* %{buildroot}%{_datadir}/php %if %{with tests} : Dev autoloader mkdir vendor -phpab --output vendor/autoload.php fixtures +phpab --output vendor/autoload.php fixtures tests cat << 'EOF' | tee -a vendor/autoload.php require_once '%{buildroot}%{_datadir}/php/Prophecy/autoload.php'; @@ -149,6 +153,10 @@ exit $ret %changelog +* Fri Feb 3 2023 Remi Collet - 1.17.0-1 +- update to 1.17.0 +- allow doctrine/instantiator v2 + * Thu Dec 1 2022 Remi Collet - 1.16.0-1 - update to 1.16.0 diff --git a/sources b/sources index 966f96b..bc7904a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.16.0-be8cac5.tgz) = fe41c3b1b7bcefe7bc7073977a022a8939dfedf4daf70a100f77abd4629f2dbc4bde93e39d160e4b68313e4e162f70a77b8cde66c2efac42ae024eb71e0242ee +SHA512 (php-phpspec-prophecy-1.17.0-15873c6.tgz) = f8bc73952b0eeb46533e7080d6fd232e636c053bb0efc5884f106b53b4e437b7e9eabfebc6612b558b43dfcb008e2994b3408cf5c59f3e3dce04494cb69d3157 From 117397e253222ff5d23983724e302a4cc3c4dd77 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 3 Feb 2023 10:18:33 +0100 Subject: [PATCH 3/3] fix autoloader (cherry picked from commit a641dc6331bf87a2a96e64efb96dc460c0a37aea) --- php-phpspec-prophecy.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index b35f84f..5352e93 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -15,7 +15,7 @@ Name: php-phpspec-prophecy Version: 1.17.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -78,11 +78,16 @@ 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 -\Fedora\Autoloader\Dependencies::required([ - [ +if (PHP_VERSION_ID > 80100) { + $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 @@ -153,6 +158,9 @@ exit $ret %changelog +* 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