From 1a886f7992055aa314fb803268029c2206c4fa9b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Sep 2020 16:06:38 +0200 Subject: [PATCH 1/5] update to 1.12.0 raise dependency on phpdocumentor/reflection-docblock 5.2 (cherry picked from commit afabea3cf821dd67b5710ab20073ebd2a7659e9f) --- .gitignore | 1 + php-phpspec-prophecy.spec | 18 +++++++++++------- sources | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 4634a21..db2b604 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ clog /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 diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index afd0ad9..d35ec29 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit b20034be5efcdab4fb60ca3a29cba2949aead160 +%global gh_commit 765cd5d5d237525f8bbadaec5dc161c83a369119 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -19,7 +19,7 @@ %endif Name: php-phpspec-prophecy -Version: 1.11.1 +Version: 1.12.0 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -34,13 +34,13 @@ Source1: %{name}-autoload.php BuildArch: noarch BuildRequires: php(language) >= 7.2 %if %{with tests} -BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 5.0 with php-composer(phpdocumentor/reflection-docblock) < 6) +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) # from composer.json, "require-dev": { # "phpspec/phpspec": "^6.0" -# "phpunit/phpunit": "^8.0" +# "phpunit/phpunit": "^8.0 || ^9.0 <9.3" BuildRequires: php-composer(phpspec/phpspec) >= 6.0 BuildRequires: phpunit8 %endif @@ -48,13 +48,13 @@ BuildRequires: phpunit8 BuildRequires: php-fedora-autoloader-devel # from composer.json, "requires": { -# "php": "^5.3|^7.0", -# "phpdocumentor/reflection-docblock": "^5.0", +# "php": "^7.2 || ~8.0, <8.1", +# "phpdocumentor/reflection-docblock": "^5.2", # "sebastian/comparator": "^3.0|^4.0", # "doctrine/instantiator": "^1.2", # "sebastian/recursion-context": "^3.0|^4.0" Requires: php(language) >= 7.2 -Requires: (php-composer(phpdocumentor/reflection-docblock) >= 5.0 with php-composer(phpdocumentor/reflection-docblock) < 6) +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) @@ -133,6 +133,10 @@ exit $ret %changelog +* Mon Sep 28 2020 Remi Collet - 1.12.0-1 +- update to 1.12.0 +- raise dependency on phpdocumentor/reflection-docblock 5.2 + * Wed Jul 8 2020 Remi Collet - 1.11.1-1 - update to 1.11.1 diff --git a/sources b/sources index 6c9e620..4067cd6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.11.1-b20034b.tgz) = 934ae0ae780651d31434118601610b6030b40a5d871a950601946fa4610273e9faf3dd955670fe79e7be86f6ab1636fe7ee08c51915455edb4322607cf4f87d9 +SHA512 (php-phpspec-prophecy-1.12.0-765cd5d.tgz) = 659d17ab451d3b4f1448401e271ac6a43996826f737e29611d86db29b0a1e2a1c6f43a35821cf8f982307779543451c34c8cf413f712e28a1c7beafa925c2369 From fd61b2c8f6d5ee3bbfa2016f4da2dbb2f9e28221 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Sep 2020 16:55:44 +0200 Subject: [PATCH 2/5] switch to classmap autoloader (cherry picked from commit 982f82b95c73f2869f2f66a72d25c4726c8f2f70) --- php-phpspec-prophecy-autoload.php | 27 --------------------------- php-phpspec-prophecy.spec | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 php-phpspec-prophecy-autoload.php diff --git a/php-phpspec-prophecy-autoload.php b/php-phpspec-prophecy-autoload.php deleted file mode 100644 index dfb7e08..0000000 --- a/php-phpspec-prophecy-autoload.php +++ /dev/null @@ -1,27 +0,0 @@ -= 7.2 %if %{with tests} @@ -79,11 +76,16 @@ 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 + +\Fedora\Autoloader\Dependencies::required([ + '%{_datadir}/php/phpDocumentor/Reflection/DocBlock5/autoload.php', +]); +/* Comparator and RecursionContext pulled by phpspec or phpunit */ +EOF %install @@ -110,12 +112,10 @@ phpspec --version ret=0 for cmd in php php72 php73 php74; do if which $cmd; then - $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ - -d auto_prepend_file=vendor/autoload.php \ + $cmd -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 - $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ - -d auto_prepend_file=vendor/autoload.php \ + $cmd -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpunit8 || ret=1 fi done @@ -133,6 +133,9 @@ exit $ret %changelog +* 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 From 857fda030c9f0df00ae153720f0154614103234a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 29 Sep 2020 14:51:16 +0200 Subject: [PATCH 3/5] v1.12..1 (cherry picked from commit ea3ddd8c664d3d8de5d9ffcf590894d9b4ade572) --- .gitignore | 1 + php-phpspec-prophecy.spec | 27 +++++++++++++++++++++++---- sources | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index db2b604..f6ec961 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ clog /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 diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 484f768..ee84fa2 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 765cd5d5d237525f8bbadaec5dc161c83a369119 +%global gh_commit 8ce87516be71aae9b956f81906aaf0338e0d8a2d %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -19,8 +19,8 @@ %endif Name: php-phpspec-prophecy -Version: 1.12.0 -Release: 2%{?dist} +Version: 1.12.1 +Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP License: MIT @@ -82,9 +82,25 @@ 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/phpDocumentor/Reflection/DocBlock5/autoload.php', ]); -/* Comparator and RecursionContext pulled by phpspec or phpunit */ +if (!class_exists('SebastianBergmann\\Comparator\\Comparator')) { // v2 from phpunit, v1 from phpspec + \Fedora\Autoloader\Dependencies::required([ + [ + '%{_datadir}/php/SebastianBergmann/Comparator4/autoload.php', + '%{_datadir}/php/SebastianBergmann/Comparator3/autoload.php', + ], + ]); +} +if (!class_exists('SebastianBergmann\\RecursionContext\\Context')) { // v2 from phpunit, v1 from phpspec + \Fedora\Autoloader\Dependencies::required([ + [ + '%{_datadir}/php/SebastianBergmann/RecursionContext4/autoload.php', + '%{_datadir}/php/SebastianBergmann/RecursionContext3/autoload.php', + ], + ]); +} EOF @@ -133,6 +149,9 @@ exit $ret %changelog +* 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 diff --git a/sources b/sources index 4067cd6..5a47117 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.12.0-765cd5d.tgz) = 659d17ab451d3b4f1448401e271ac6a43996826f737e29611d86db29b0a1e2a1c6f43a35821cf8f982307779543451c34c8cf413f712e28a1c7beafa925c2369 +SHA512 (php-phpspec-prophecy-1.12.1-8ce8751.tgz) = 4ea205c1e5780c351b03c8db251968b136755226220d73bfea634ac48023d395f09304e50f8c655597d01b5208af79c32c0c35fbecb71f3b1ed333b7d1b2432d From 64da380c1b0f65be20dbba4dea67a613f81331aa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 21 Dec 2020 09:02:18 +0100 Subject: [PATCH 4/5] update to 1.12.2 switch to phpunit9 (cherry picked from commit c039cfffdbb4a33c5203f7d103e5808030330988) --- .gitignore | 1 + php-phpspec-prophecy.spec | 28 +++++++++++++++++++--------- sources | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index f6ec961..30d7e9b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ clog /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 diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index ee84fa2..97d580a 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 8ce87516be71aae9b956f81906aaf0338e0d8a2d +%global gh_commit 245710e971a030f42e08f4912863805570f23d39 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -19,7 +19,7 @@ %endif Name: php-phpspec-prophecy -Version: 1.12.1 +Version: 1.12.2 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -37,9 +37,14 @@ BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with p BuildRequires: (php-composer(doctrine/instantiator) >= 1.2 with php-composer(doctrine/instantiator) < 2) # from composer.json, "require-dev": { # "phpspec/phpspec": "^6.0" -# "phpunit/phpunit": "^8.0 || ^9.0 <9.3" +# "phpunit/phpunit": "^8.0 || ^9.0" BuildRequires: php-composer(phpspec/phpspec) >= 6.0 -BuildRequires: phpunit8 +%if 0%{?fedora} >= 32 || 0%{?rhel} >=9 +%global phpunit %{_bindir}/phpunit9 +%else +%global phpunit %{_bindir}/phpunit8 +%endif +BuildRequires: %{phpunit} %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -126,13 +131,14 @@ php %{buildroot}%{_datadir}/php/Prophecy/autoload.php phpspec --version ret=0 -for cmd in php php72 php73 php74; do - if which $cmd; then - $cmd -d auto_prepend_file=vendor/autoload.php \ +for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do + if which $cmdarg; then + set $cmdarg + $1 -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 - $cmd -d auto_prepend_file=vendor/autoload.php \ - %{_bindir}/phpunit8 || ret=1 + $1 -d auto_prepend_file=vendor/autoload.php \ + ${2:-%{_bindir}/phpunit9}|| ret=1 fi done exit $ret @@ -149,6 +155,10 @@ exit $ret %changelog +* 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 diff --git a/sources b/sources index 5a47117..5e155cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.12.1-8ce8751.tgz) = 4ea205c1e5780c351b03c8db251968b136755226220d73bfea634ac48023d395f09304e50f8c655597d01b5208af79c32c0c35fbecb71f3b1ed333b7d1b2432d +SHA512 (php-phpspec-prophecy-1.12.2-245710e.tgz) = 71638338fdc27ab7f64ef4f0673070ac812ab2b7dedb4c952106f4cb498a5af04785aab0d957636cde95ed6e91df4a0aec8057b994c0db8fc021089bf7868d25 From 141368a8fc35cb26c52191edb7576a56014b46dc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 18 Mar 2021 06:55:03 +0100 Subject: [PATCH 5/5] v1.13.0 (cherry picked from commit aef4e605487ec16ead802d53602f984e55fe3f1d) (cherry picked from commit 56fd71def40b9776cd60fd19e0998f3eca29749a) --- .gitignore | 1 + php-phpspec-prophecy.spec | 16 +++++++--------- sources | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 30d7e9b..4bf7bcf 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ clog /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 diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 97d580a..305dc52 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -1,25 +1,20 @@ # remirepo/fedora spec file for php-phpspec-prophecy # -# Copyright (c) 2015-2019 Remi Collet +# Copyright (c) 2015-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global bootstrap 0 -%global gh_commit 245710e971a030f42e08f4912863805570f23d39 +%global gh_commit be1996ed8adc35c3fd795488a653f4b518be70ea %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy -%if %{bootstrap} -# no test because of circular dependency with phpspec -%bcond_with tests -%else + %bcond_without tests -%endif Name: php-phpspec-prophecy -Version: 1.12.2 +Version: 1.13.0 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -155,6 +150,9 @@ exit $ret %changelog +* Thu Mar 18 2021 Remi Collet - 1.13.0-1 +- update to 1.13.0 + * Mon Dec 21 2020 Remi Collet - 1.12.2-1 - update to 1.12.2 - switch to phpunit9 diff --git a/sources b/sources index 5e155cb..b1188a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.12.2-245710e.tgz) = 71638338fdc27ab7f64ef4f0673070ac812ab2b7dedb4c952106f4cb498a5af04785aab0d957636cde95ed6e91df4a0aec8057b994c0db8fc021089bf7868d25 +SHA512 (php-phpspec-prophecy-1.13.0-be1996e.tgz) = 12b80dbfe9bdbe54935eb25ad039d698ac1538dd5a6c30a3799df1aa3c761bdfcf2d8e8091a7c88eb8233af403d62e082373b3bbec19951b1432e0305aa5f037