diff options
-rw-r--r-- | composer.json | 6 | ||||
-rw-r--r-- | php-sebastian-global-state5.spec | 43 |
2 files changed, 28 insertions, 21 deletions
diff --git a/composer.json b/composer.json index 031a7d3..1abf043 100644 --- a/composer.json +++ b/composer.json @@ -19,13 +19,13 @@ "sort-packages": true }, "require": { - "php": "^7.3", + "php": "^7.3 || ^8.0", "sebastian/object-reflector": "^2.0", "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -45,7 +45,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } } } diff --git a/php-sebastian-global-state5.spec b/php-sebastian-global-state5.spec index cbaff64..3910950 100644 --- a/php-sebastian-global-state5.spec +++ b/php-sebastian-global-state5.spec @@ -6,8 +6,13 @@ # # Please, preserve the changelog entries # -%global bootstrap 0 -%global gh_commit bdb1e7c79e592b8c82cb1699be3c8743119b8a72 +%bcond_without bootstrap +%if %{with bootstrap} +%bcond_with tests +%else +%bcond_without tests +%endif +%global gh_commit 22ae663c951bdc39da96603edc3239ed3a299097 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project global-state @@ -17,22 +22,18 @@ # Namespace %global ns_vendor SebastianBergmann %global ns_project GlobalState -%global major 4 +%global major 5 %global php_home %{_datadir}/php -%if %{bootstrap} -%global with_tests 0%{?_with_tests:1} -%else -%global with_tests 0%{!?_without_tests:1} -%endif Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 4.0.0 +Version: 5.0.0 Release: 1%{?dist} Summary: Snapshotting of global state License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: makesrc.sh BuildArch: noarch BuildRequires: php(language) >= 7.3 @@ -40,7 +41,7 @@ BuildRequires: php-reflection BuildRequires: php-spl # Autoloader BuildRequires: php-fedora-autoloader-devel >= 1.0.0 -%if %{with_tests} +%if %{with tests} # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(sebastian/object-reflector) >= 2.0 with php-composer(sebastian/object-reflector) < 3) @@ -52,14 +53,13 @@ BuildRequires: php-sebastian-recursion-context4 %endif # from composer.json, "require-dev": { # "ext-dom": "*", -# "phpunit/phpunit": "^9.0" -# TODO test suite passes with v8, switch to v9 when available -BuildRequires: phpunit8 +# "phpunit/phpunit": "^9.3" +BuildRequires: phpunit9 >= 9.3 BuildRequires: php-dom %endif # from composer.json, "require": { -# "php": "^7.3", +# "php": "^7.3 || ^8.0", # "sebastian/object-reflector": "^2.0", # "sebastian/recursion-context": "^4.0" Requires: php(language) >= 7.3 @@ -115,7 +115,7 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} %check -%if %{with_tests} +%if %{with tests} mkdir vendor cat <<EOF | tee vendor/autoload.php <?php @@ -128,10 +128,12 @@ EOF : Run upstream test suite ret=0 -for cmd in php php73 php74; do +for cmd in php php73 php74 php80; do if which $cmd; then $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ - %{_bindir}/phpunit8 --verbose || ret=1 + %{_bindir}/phpunit9 \ + --filter '^((?!(testConstructorExcludesAspectsWhenTheyShouldNotBeIncluded)).)*$' \ + --verbose || ret=1 fi done exit $ret @@ -151,6 +153,11 @@ exit $ret %changelog +* Mon Aug 10 2020 Remi Collet <remi@remirepo.net> - 5.0.0-1 +- update to 5.0.0 +- rename to php-sebastian-global-state5 +- move to /usr/share/php/SebastianBergmann/GlobalState5 + * Fri Feb 7 2020 Remi Collet <remi@remirepo.net> - 4.0.0-1 - update to 4.0.0 - raise dependency on PHP 7.3 |