diff options
-rw-r--r-- | php-sebastian-object-enumerator3.spec | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/php-sebastian-object-enumerator3.spec b/php-sebastian-object-enumerator3.spec index bdd9487..07ed1ff 100644 --- a/php-sebastian-object-enumerator3.spec +++ b/php-sebastian-object-enumerator3.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-sebastian-object-enumerator3 # -# Copyright (c) 2015-2018 Remi Collet +# Copyright (c) 2015-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -24,10 +24,11 @@ %global with_tests 0%{!?_without_tests:1} %endif +# NOTICE: used by phpunit 6, 7 and 8 + Name: php-%{pk_vendor}-%{pk_project}%{major} Version: 3.0.4 -%global specrel 3 -Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} +Release: 4%{?dist} Summary: Traverses array and object to enumerate all referenced objects License: BSD @@ -38,16 +39,18 @@ BuildArch: noarch BuildRequires: php(language) >= 7.0 BuildRequires: php-fedora-autoloader-devel %if %{with_tests} +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(%{pk_vendor}/object-reflector) >= 1.1.1 with php-composer(%{pk_vendor}/object-reflector) < 2) BuildRequires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 4) +# remirepo:4 %else BuildRequires: php-sebastian-object-reflector BuildRequires: php-sebastian-recursion-context3 %endif # From composer.json"require-dev": { # "phpunit/phpunit": "^6.0" -BuildRequires: phpunit6 +BuildRequires: phpunit8 %endif # from composer.json @@ -55,9 +58,11 @@ BuildRequires: phpunit6 # "sebastian/object-reflector": "^1.1.1", # "sebastian/recursion-context": "^3.0" Requires: php(language) >= 7.0 +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(%{pk_vendor}/object-reflector) >= 1.1.1 with php-composer(%{pk_vendor}/object-reflector) < 2) Requires: (php-composer(sebastian/recursion-context) >= 3.0 with php-composer(sebastian/recursion-context) < 4) +# remirepo:4 %else Requires: php-sebastian-object-reflector Requires: php-sebastian-recursion-context3 @@ -89,8 +94,8 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php %{_bindir}/phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php // Dependencies -require_once 'SebastianBergmann/ObjectReflector/autoload.php'; -require_once 'SebastianBergmann/RecursionContext3/autoload.php'; +require_once '%{php_home}/%{ns_vendor}/ObjectReflector/autoload.php'; +require_once '%{php_home}/%{ns_vendor}/RecursionContext3/autoload.php'; EOF @@ -104,12 +109,15 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} mkdir vendor %{_bindir}/phpab --template fedora --output vendor/autoload.php tests/_fixture +: Fix for phpunit8 +find tests/ -name \*php -exec sed -e 's/setUp()/setUp():void/' -i {} \; + : Run upstream test suite ret=0 for cmd in php php72 php73 php74 php80; do if which $cmd; then - %{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ - %{_bindir}/phpunit6 --verbose || ret=1 + %{_bindir}/php -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ + %{_bindir}/phpunit8 --verbose || ret=1 fi done exit $ret @@ -119,6 +127,7 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.md composer.json @@ -126,6 +135,9 @@ exit $ret %changelog +* Wed Mar 10 2021 Remi Collet <remi@remirepo.net> - 3.0.4-4 +- switch to phpunit8 + * Mon Nov 30 2020 Remi Collet <remi@remirepo.net> - 3.0.4-1 - update to 3.0.4 (no change) |