diff options
Diffstat (limited to 'php-phpspec-prophecy.spec')
-rw-r--r-- | php-phpspec-prophecy.spec | 100 |
1 files changed, 60 insertions, 40 deletions
diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 412b264..680fee5 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,19 +7,19 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 451c3cd1418cf640de218914901e51b064abb093 +%global gh_commit 8ff0384cd5d87e038297e79d85c99e4b2dcf0e61 %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 -%global with_tests 0%{?_with_tests:1} +%bcond_with tests %else -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests %endif Name: php-phpspec-prophecy -Version: 1.10.3 +Version: 1.11.0 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -32,43 +32,51 @@ Source2: makesrc.sh Source1: %{name}-autoload.php BuildArch: noarch -%if %{with_tests} +BuildRequires: php(language) >= 7.2 +%if %{with tests} +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 5.0 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) +# remirepo:6 +%else +BuildRequires: php-phpdocumentor-reflection-docblock5 +BuildRequires: php-sebastian-comparator3 +BuildRequires: php-sebastian-recursion-context3 +BuildRequires: php-doctrine-instantiator >= 1.2 +%endif # from composer.json, "require-dev": { -# "phpspec/phpspec": "^2.5|^3.2" -# "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" -BuildRequires: php-composer(phpspec/phpspec) >= 2.5 -# Autoloader -BuildRequires: php-composer(fedora/autoloader) +# "phpspec/phpspec": "^6.0" +# "phpunit/phpunit": "^8.0" +BuildRequires: php-composer(phpspec/phpspec) >= 6.0 +BuildRequires: phpunit8 %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|^5.0", -# "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", -# "doctrine/instantiator": "^1.0.2", -# "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" -Requires: php(language) >= 5.3 +# "phpdocumentor/reflection-docblock": "^5.0", +# "sebastian/comparator": "^3.0|^4.0", +# "doctrine/instantiator": "^1.2", +# "sebastian/recursion-context": "^3.0|^4.0" +Requires: php(language) >= 7.2 +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(phpdocumentor/reflection-docblock) >= 2.0 with php-composer(phpdocumentor/reflection-docblock) < 6) -Requires: (php-composer(sebastian/comparator) >= 1.2.3 with php-composer(sebastian/comparator) < 5) -# recursion-context will be pulled by phpspec or phpunit or phpunit6 -#Requires: (php-composer(sebastian/recursion-context) >= 1.0 with php-composer(sebastian/recursion-context) < 4) -# use 1.0.4 to ensure we have the autoloader -Requires: (php-composer(doctrine/instantiator) >= 1.0.4 with php-composer(doctrine/instantiator) < 2) +Requires: (php-composer(phpdocumentor/reflection-docblock) >= 5.0 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) +# remirepo:4 %else -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.2.3 -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 +Requires: php-phpdocumentor-reflection-docblock5 +Requires: php-sebastian-comparator3 +Requires: php-sebastian-recursion-context3 +Requires: php-doctrine-instantiator >= 1.2 %endif -# From phpcompatinfo report for version 1.1.0 +# From phpcompatinfo report for version 1.11.0 Requires: php-pcre Requires: php-reflection Requires: php-spl @@ -102,23 +110,26 @@ cp -pr src/* %{buildroot}%{_datadir}/php %check -%if %{with_tests} +%if %{with tests} +: Dev autoloader +mkdir vendor +phpab --output vendor/autoload.php fixtures + : check autoloader php %{buildroot}%{_datadir}/php/Prophecy/autoload.php : 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 ret=0 -for cmd in php php70 php71 php72 php73 php74; do +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 \ %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 + + $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ + %{_bindir}/phpunit8 || ret=1 fi done exit $ret @@ -128,6 +139,7 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -136,6 +148,14 @@ exit $ret %changelog +* Wed Jul 8 2020 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 1.10.3-1 - update to 1.10.3 - allow phpdocumentor/reflection-docblock 5.0 |