summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--composer.json24
-rw-r--r--php-sabre-http5.spec74
3 files changed, 77 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/composer.json b/composer.json
index 198cf23..353646a 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"homepage" : "https://github.com/fruux/sabre-http",
"license" : "BSD-3-Clause",
"require" : {
- "php" : "^7.1",
+ "php" : "^7.1 || ^8.0",
"ext-mbstring" : "*",
"ext-ctype" : "*",
"ext-curl" : "*",
@@ -13,8 +13,9 @@
"sabre/uri" : "^2.0"
},
"require-dev" : {
- "friendsofphp/php-cs-fixer": "~2.16.1",
- "phpunit/phpunit" : "^7.0 || ^8.0"
+ "friendsofphp/php-cs-fixer": "~2.17.1",
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
},
"suggest" : {
"ext-curl" : " to make http requests with the Client class"
@@ -44,7 +45,20 @@
"Sabre\\HTTP\\" : "tests/HTTP"
}
},
- "config" : {
- "bin-dir" : "bin/"
+ "scripts": {
+ "phpstan": [
+ "phpstan analyse lib tests"
+ ],
+ "cs-fixer": [
+ "php-cs-fixer fix"
+ ],
+ "phpunit": [
+ "phpunit --configuration tests/phpunit.xml"
+ ],
+ "test": [
+ "composer phpstan",
+ "composer cs-fixer",
+ "composer phpunit"
+ ]
}
}
diff --git a/php-sabre-http5.spec b/php-sabre-http5.spec
index ab4a6c5..7d7361e 100644
--- a/php-sabre-http5.spec
+++ b/php-sabre-http5.spec
@@ -1,13 +1,16 @@
# remirepo/fedora spec file for php-sabre-http5
#
-# Copyright (c) 2013-2020 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2013-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
+
+%bcond_without tests
+
# Github
-%global gh_commit 23446999f1f6e62892bbd89745070aa902dd3539
+%global gh_commit f9f3d1fba8916fa2f4ec25636c4fedc26cb94e02
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sabre-io
%global gh_project http
@@ -18,19 +21,18 @@
%global ns_vendor Sabre
%global ns_project HTTP
%global major 5
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
Name: php-%{pk_vendor}-%{pk_project}%{major}
Summary: Library for dealing with http requests and responses
-Version: 5.1.0
+Version: 5.1.10
Release: 1%{?dist}
URL: https://github.com/%{gh_owner}/%{gh_project}
-License: BSD
+License: BSD-3-Clause
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
BuildArch: noarch
-%if %{with_tests}
+%if %{with tests}
BuildRequires: php(language) >= 7.1
BuildRequires: php-mbstring
BuildRequires: php-ctype
@@ -39,15 +41,16 @@ BuildRequires: php-ctype
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)
# From composer.json, "require-dev" : {
-# "friendsofphp/php-cs-fixer": "~2.16.1",
-# "phpunit/phpunit" : "^7.0 || ^8.0"
-# remirepo:6
+# "friendsofphp/php-cs-fixer": "~2.17.1",
+# "phpstan/phpstan": "^0.12",
+# "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
+# remirepo:4
%else
BuildRequires: php-sabre-event5
BuildRequires: php-sabre-uri2
%endif
-BuildRequires: phpunit8
-%global phpunit %{_bindir}/phpunit8
+BuildRequires: phpunit9
+%global phpunit %{_bindir}/phpunit9
BuildRequires: php-curl
BuildRequires: php-date
BuildRequires: php-hash
@@ -59,7 +62,7 @@ BuildRequires: php-xml
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require" : {
-# "php" : "^7.1",
+# "php" : "^7.1 || ^8.0",
# "ext-mbstring" : "*",
# "ext-ctype" : "*",
# "ext-curl" : "*",
@@ -149,22 +152,30 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}
%check
-%if %{with_tests}
+: Check version
+php -r '
+require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php";
+echo Sabre\HTTP\Version::VERSION . "\n";
+exit (Sabre\HTTP\Version::VERSION === "%{version}" ? 0 : 1);
+'
+
+%if %{with tests}
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
+sed -e "s/localhost:8000/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 php72 php73 php74; do
- if which $cmd; then
- $cmd %{phpunit} --verbose || ret=1
+for cmdarg in "php %{phpunit}" php80 php81 php82 php83; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1
fi
done
@@ -186,8 +197,35 @@ exit $ret
%changelog
+* Thu Aug 24 2023 Remi Collet <remi@remirepo.net> - 5.1.10-1
+- update to 5.1.10
+
+* Mon Jun 26 2023 Remi Collet <remi@remirepo.net> - 5.1.7-1
+- update to 5.1.7
+
+* Mon Jul 18 2022 Remi Collet <remi@remirepo.net> - 5.1.6-1
+- update to 5.1.6
+
+* Mon Jul 11 2022 Remi Collet <remi@remirepo.net> - 5.1.5-1
+- update to 5.1.5
+
+* Fri Jun 24 2022 Remi Collet <remi@remirepo.net> - 5.1.4-1
+- update to 5.1.4
+
+* Thu Nov 4 2021 Remi Collet <remi@remirepo.net> - 5.1.3-1
+- update to 5.1.3
+
+* Thu Nov 4 2021 Remi Collet <remi@remirepo.net> - 5.1.2-1
+- update to 5.1.2
+
+* Mon Oct 5 2020 Remi Collet <remi@remirepo.net> - 5.1.1-1
+- update to 5.1.1
+- switch to phpunit9
+
* Sat Feb 1 2020 Remi Collet <remi@remirepo.net> - 5.1.0-1
- update to 5.1.0
+- raise dependency on PHP 7.1
+- switch to phpunit8
* Fri Nov 29 2019 Remi Collet <remi@remirepo.net> - 5.0.5-1
- update to 5.0.5