summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-11-13 13:41:17 +0100
committerRemi Collet <remi@remirepo.net>2018-11-13 13:41:17 +0100
commit0e88c98897757ff0b198b951143f727652a1d7d9 (patch)
tree85d43e0722e7bb71c89e8f52b09622ee28ec762c
parent2f9d31306834ef405dc1f1cacbe095f4efdb178b (diff)
From Fedora:
Update to 0.5.9 (RHBZ #1454517) Add range version dependencies for Fedora >= 27 || RHEL >= 8 Add composer.json to repo
-rw-r--r--.gitignore11
-rw-r--r--composer.json21
-rw-r--r--php-react-http-client.spec128
3 files changed, 104 insertions, 56 deletions
diff --git a/.gitignore b/.gitignore
index 18479e5..fc9aa8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,8 @@
-/php-react-http-client-0.4.15-01e919008363622334f91419a9908b3a51754ccd.tar.gz
-/php-react-http-client-0.4.16-307d8f9c9062c9f2fb21cde6ad13afee040cce15.tar.gz
-/php-react-http-client-0.4.17-75ee8a113f156834aaabfe0055e8db531cb4892c.tar.gz
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index aeba55d..4cd9d7f 100644
--- a/composer.json
+++ b/composer.json
@@ -1,20 +1,21 @@
{
"name": "react/http-client",
- "description": "Asynchronous HTTP client library.",
+ "description": "Event-driven, streaming HTTP client for ReactPHP",
"keywords": ["http"],
"license": "MIT",
"require": {
- "php": ">=5.4.0",
- "guzzlehttp/psr7": "^1.0",
- "react/socket-client": "^0.5 || ^0.4 || ^0.3",
- "react/dns": "0.4.*",
- "react/event-loop": "0.4.*",
- "react/stream": "0.4.*",
- "react/promise": "~2.2",
- "evenement/evenement": "~2.0"
+ "php": ">=5.3.0",
+ "evenement/evenement": "^3.0 || ^2.0 || ^1.0",
+ "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3",
+ "react/promise": "^2.1 || ^1.2.1",
+ "react/socket": "^1.0 || ^0.8.4",
+ "react/stream": "^1.0 || ^0.7.1",
+ "ringcentral/psr7": "^1.2"
},
"require-dev": {
- "phpunit/phpunit": "^5.0 || ^4.8.10"
+ "clue/block-react": "^1.2",
+ "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35",
+ "react/promise-stream": "^1.1"
},
"autoload": {
"psr-4": {
diff --git a/php-react-http-client.spec b/php-react-http-client.spec
index 33267ae..afe1500 100644
--- a/php-react-http-client.spec
+++ b/php-react-http-client.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-react-http-client
#
-# Copyright (c) 2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2017-2018 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,35 +12,43 @@
%global github_owner reactphp
%global github_name http-client
-%global github_version 0.4.17
-%global github_commit 75ee8a113f156834aaabfe0055e8db531cb4892c
+%global github_version 0.5.9
+%global github_commit f8e81a022b61938e0b37c94c6351fc170b7d87f6
%global composer_vendor react
%global composer_project http-client
# "php": ">= 5.4.0"
%global php_min_ver 5.4.0
-# "evenement/evenement": "~2.0"
+# "clue/block-react": "^1.2"
+%global clue_block_react_min_ver 1.2
+%global clue_block_react_max_ver 2.0
+# "evenement/evenement": "^3.0 || ^2.0 || ^1.0"
+# NOTE: Restricting to one major version
%global evenement_min_ver 2.0
%global evenement_max_ver 3.0
-# "guzzlehttp/psr7": "^1.0"
-%global guzzlehttp_psr7_min_ver 1.0
-%global guzzlehttp_psr7_max_ver 2.0
-# "react/dns": "0.4.*"
-%global react_dns_min_ver 0.4.0
-%global react_dns_max_ver 0.5.0
-# "react/event-loop": "0.4.*"
-%global react_event_loop_min_ver 0.4.0
-%global react_event_loop_max_ver 0.5.0
-# "react/promise": "~2.2"
-%global react_promise_min_ver 2.2
+# "ringcentral/psr7": "^1.2"
+%global ringcentral_psr7_min_ver 1.2
+%global ringcentral_psr7_max_ver 2.0
+# "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3"
+# NOTE: Restricting to one major version
+%global react_event_loop_min_ver 0.5
+%global react_event_loop_max_ver 1.0
+# "react/promise": "^2.1 || ^1.2.1"
+# NOTE: Restricting to one major version
+%global react_promise_min_ver 2.1
%global react_promise_max_ver 3.0
-# "react/socket-client": "^0.5 || ^0.4 || ^0.3"
-%global react_socket_client_min_ver 0.3
-%global react_socket_client_max_ver 1.0
-# "react/stream": "0.4.*"
-%global react_stream_min_ver 0.4.0
-%global react_stream_max_ver 0.5.0
+# "react/promise-stream": "^1.1"
+%global react_promise_stream_min_ver 1.1
+%global react_promise_stream_max_ver 2.0
+# "react/socket": "^1.0 || ^0.8.4"
+# NOTE: Restricting to one major version
+%global react_socket_min_ver 0.8.4
+%global react_socket_max_ver 1.0
+# "react/stream": "^1.0 || ^0.7.1"
+# NOTE: Restricting to one major version
+%global react_stream_min_ver 0.7.1
+%global react_stream_max_ver 1.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -54,8 +62,8 @@ Summary: Asynchronous HTTP client library
Group: Development/Libraries
License: MIT
-URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+URL: https://reactphp.org/http-client/
+Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
BuildArch: noarch
# Tests
@@ -63,21 +71,34 @@ BuildArch: noarch
## composer.json
Requires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(clue/block-react) >= %{clue_block_react_min_ver} with php-composer(clue/block-react) < %{clue_block_react_max_ver})
+BuildRequires: (php-composer(evenement/evenement) >= %{evenement_min_ver} with php-composer(evenement/evenement) < %{evenement_max_ver})
+BuildRequires: (php-composer(react/event-loop) >= %{react_event_loop_min_ver} with php-composer(react/event-loop) < %{react_event_loop_max_ver})
+BuildRequires: (php-composer(react/promise-stream) >= %{react_promise_stream_min_ver} with php-composer(react/promise-stream) < %{react_promise_stream_max_ver})
+BuildRequires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver})
+BuildRequires: (php-composer(react/socket) >= %{react_socket_min_ver} with php-composer(react/socket) < %{react_socket_max_ver})
+BuildRequires: (php-composer(react/stream) >= %{react_stream_min_ver} with php-composer(react/stream) < %{react_stream_max_ver})
+BuildRequires: (php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver} with php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver})
+%else
+BuildRequires: php-composer(clue/block-react) < %{clue_block_react_max_ver}
+BuildRequires: php-composer(clue/block-react) >= %{clue_block_react_min_ver}
BuildRequires: php-composer(evenement/evenement) < %{evenement_max_ver}
BuildRequires: php-composer(evenement/evenement) >= %{evenement_min_ver}
-BuildRequires: php-composer(guzzlehttp/psr7) < %{guzzlehttp_psr7_max_ver}
-BuildRequires: php-composer(guzzlehttp/psr7) >= %{guzzlehttp_psr7_min_ver}
-BuildRequires: php-composer(react/dns) < %{react_dns_max_ver}
-BuildRequires: php-composer(react/dns) >= %{react_dns_min_ver}
BuildRequires: php-composer(react/event-loop) < %{react_event_loop_max_ver}
BuildRequires: php-composer(react/event-loop) >= %{react_event_loop_min_ver}
+BuildRequires: php-composer(react/promise-stream) < %{react_promise_stream_max_ver}
+BuildRequires: php-composer(react/promise-stream) >= %{react_promise_stream_min_ver}
BuildRequires: php-composer(react/promise) < %{react_promise_max_ver}
BuildRequires: php-composer(react/promise) >= %{react_promise_min_ver}
-BuildRequires: php-composer(react/socket-client) < %{react_socket_client_max_ver}
-BuildRequires: php-composer(react/socket-client) >= %{react_socket_client_min_ver}
+BuildRequires: php-composer(react/socket) < %{react_socket_max_ver}
+BuildRequires: php-composer(react/socket) >= %{react_socket_min_ver}
BuildRequires: php-composer(react/stream) < %{react_stream_max_ver}
BuildRequires: php-composer(react/stream) >= %{react_stream_min_ver}
-## phpcompatinfo (computed from version 0.4.17)
+BuildRequires: php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver}
+BuildRequires: php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver}
+%endif
+## phpcompatinfo (computed from version 0.5.9)
BuildRequires: php-json
BuildRequires: php-spl
## Autoloader
@@ -86,21 +107,28 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(evenement/evenement) >= %{evenement_min_ver} with php-composer(evenement/evenement) < %{evenement_max_ver})
+Requires: (php-composer(react/event-loop) >= %{react_event_loop_min_ver} with php-composer(react/event-loop) < %{react_event_loop_max_ver})
+Requires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver})
+Requires: (php-composer(react/socket) >= %{react_socket_min_ver} with php-composer(react/socket) < %{react_socket_max_ver})
+Requires: (php-composer(react/stream) >= %{react_stream_min_ver} with php-composer(react/stream) < %{react_stream_max_ver})
+Requires: (php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver} with php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver})
+%else
Requires: php-composer(evenement/evenement) < %{evenement_max_ver}
Requires: php-composer(evenement/evenement) >= %{evenement_min_ver}
-Requires: php-composer(guzzlehttp/psr7) < %{guzzlehttp_psr7_max_ver}
-Requires: php-composer(guzzlehttp/psr7) >= %{guzzlehttp_psr7_min_ver}
-Requires: php-composer(react/dns) < %{react_dns_max_ver}
-Requires: php-composer(react/dns) >= %{react_dns_min_ver}
Requires: php-composer(react/event-loop) < %{react_event_loop_max_ver}
Requires: php-composer(react/event-loop) >= %{react_event_loop_min_ver}
Requires: php-composer(react/promise) < %{react_promise_max_ver}
Requires: php-composer(react/promise) >= %{react_promise_min_ver}
-Requires: php-composer(react/socket-client) < %{react_socket_client_max_ver}
-Requires: php-composer(react/socket-client) >= %{react_socket_client_min_ver}
+Requires: php-composer(react/socket) < %{react_socket_max_ver}
+Requires: php-composer(react/socket) >= %{react_socket_min_ver}
Requires: php-composer(react/stream) < %{react_stream_max_ver}
Requires: php-composer(react/stream) >= %{react_stream_min_ver}
-# phpcompatinfo (computed from version 0.4.17)
+Requires: php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver}
+Requires: php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver}
+%endif
+# phpcompatinfo (computed from version 0.5.9)
Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -132,12 +160,11 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Dependencies::required(array(
'%{phpdir}/Evenement/autoload.php',
- '%{phpdir}/GuzzleHttp/Psr7/autoload.php',
- '%{phpdir}/React/Dns/autoload.php',
'%{phpdir}/React/EventLoop/autoload.php',
'%{phpdir}/React/Promise/autoload.php',
- '%{phpdir}/React/SocketClient/autoload.php',
+ '%{phpdir}/React/Socket/autoload.php',
'%{phpdir}/React/Stream/autoload.php',
+ '%{phpdir}/RingCentral/Psr7/autoload.php',
));
AUTOLOAD
@@ -153,14 +180,24 @@ cp -rp src %{buildroot}%{phpdir}/React/HttpClient
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require '%{buildroot}%{phpdir}/React/HttpClient/autoload.php';
+
\Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\HttpClient\\', __DIR__.'/tests');
+
+\Fedora\Autoloader\Dependencies::required(array(
+ '%{phpdir}/Clue/React/Block/autoload.php',
+ '%{phpdir}/React/Promise/Stream/autoload.php',
+));
BOOTSTRAP
+: Skip tests requiring network access
+rm -f tests/FunctionalIntegrationTest.php
+
: Upstream tests
RETURN_CODE=0
-for PHP_EXEC in php %{?rhel:php55} php56 php70 php71; do
- if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then
- $PHP_EXEC %{_bindir}/phpunit --bootstrap bootstrap.php --verbose \
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" %{?rhel:php54 php55} php70 php71 php72 php73; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
fi
done
@@ -179,6 +216,11 @@ exit $RETURN_CODE
%changelog
+* Mon Jul 02 2018 Shawn Iwinski <shawn@iwin.ski> - 0.5.9-1
+- Update to 0.5.9 (RHBZ #1454517)
+- Add range version dependencies for Fedora >= 27 || RHEL >= 8
+- Add composer.json to repo
+
* Sat Apr 08 2017 Shawn Iwinski <shawn@iwin.ski> - 0.4.17-1
- Update to 0.4.17 (RHBZ #1434200)