From 9c12e137e98700ec7b27bb9ededc13a65463fae0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 11 Sep 2019 15:17:10 +0200 Subject: - update to 5.0.1 - drop patch merged upstream - switch to phpunit7 --- php-sabre-http5.spec | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) (limited to 'php-sabre-http5.spec') diff --git a/php-sabre-http5.spec b/php-sabre-http5.spec index 2c4bf8e..be4ec07 100644 --- a/php-sabre-http5.spec +++ b/php-sabre-http5.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # # Github -%global gh_commit f91c7d4437dcbc6f89c8b64e855e1544f4b60250 +%global gh_commit 4125c77f21a802d4335a2be27cba210fc8717307 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project http @@ -22,15 +22,13 @@ Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: Library for dealing with http requests and responses -Version: 5.0.0 -Release: 4%{?dist} +Version: 5.0.1 +Release: 1%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz -Patch0: %{name}-php74.patch - BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 7.0 @@ -40,10 +38,16 @@ BuildRequires: php-ctype %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(sabre/event) >= 4.0 with php-composer(sabre/event) < 6) BuildRequires: (php-composer(sabre/uri) >= 2.0 with php-composer(sabre/uri) < 3) -# remirepo:4 +# From composer.json, "require-dev" : { +# "phpunit/phpunit" : "^6.0 || ^7.0" +BuildRequires: phpunit7 +%global phpunit %{_bindir}/phpunit7 +# remirepo:6 %else BuildRequires: php-sabre-event5 BuildRequires: php-sabre-uri2 +BuildRequires: phpunit6 +%global phpunit %{_bindir}/phpunit6 %endif BuildRequires: php-curl BuildRequires: php-date @@ -51,23 +55,21 @@ BuildRequires: php-hash BuildRequires: php-pcre BuildRequires: php-spl BuildRequires: php-xml -# From composer.json, "require-dev" : { -# "phpunit/phpunit" : ">=6.0.0", -# "sabre/cs" : "~1.0.0" -BuildRequires: phpunit6 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer.json, "require" : { -# "php" : ">=7.0", +# "php" : "^7.0", # "ext-mbstring" : "*", # "ext-ctype" : "*", +# "ext-curl" : "*", # "sabre/event" : ">=4.0 <6.0", # "sabre/uri" : "~2.0" Requires: php(language) >= 7.0 Requires: php-mbstring Requires: php-ctype +Requires: php-curl # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(sabre/event) >= 4.0 with php-composer(sabre/event) < 6) @@ -77,9 +79,6 @@ Requires: (php-composer(sabre/uri) >= 2.0 with php-composer(sabre/uri) Requires: php-sabre-event5 Requires: php-sabre-uri2 %endif -# From composer.json, "suggest" : { -# "ext-curl" : " to make http requests with the Client class" -Requires: php-curl # From phpcompatinfo report for version 5.0.0 Requires: php-date Requires: php-hash @@ -123,7 +122,6 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 phpab -t fedora -o lib/autoload.php lib cat << 'EOF' | tee -a lib/autoload.php @@ -157,13 +155,22 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major} cd tests ln -sf %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php bootstrap.php +: Start a Development web server +PORT=$(expr 8080 + %{?fedora}%{?rhel}) +sed -e "s/localhost/127.0.0.1:$PORT/" -i phpunit.xml +%{_bindir}/php -S 127.0.0.1:$PORT -t $PWD/www &>web.log & +PHPPID=$! + : Run upstream test suite against installed library ret=0 for cmd in php php71 php72 php73 php74; do if which $cmd; then - $cmd %{_bindir}/phpunit6 --verbose || ret=1 + $cmd %{phpunit} --verbose || ret=1 fi done + +kill $PHPPID || : + exit $ret %else : Skip upstream test suite @@ -180,6 +187,11 @@ exit $ret %changelog +* Wed Sep 11 2019 Remi Collet - 5.0.1-1 +- update to 5.0.1 +- drop patch merged upstream +- switch to phpunit7 + * Tue Aug 20 2019 Remi Collet - 5.0.0-4 - add patch for 7.4 from https://github.com/sabre-io/http/pull/121 -- cgit