summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json54
-rw-r--r--php-react-http.spec117
2 files changed, 119 insertions, 52 deletions
diff --git a/composer.json b/composer.json
index ab26ee8..6924ebf 100644
--- a/composer.json
+++ b/composer.json
@@ -1,24 +1,52 @@
{
"name": "react/http",
- "description": "Event-driven, streaming plaintext HTTP and secure HTTPS server for ReactPHP",
- "keywords": ["event-driven", "streaming", "HTTP", "HTTPS", "server", "ReactPHP"],
+ "description": "Event-driven, streaming HTTP client and server implementation for ReactPHP",
+ "keywords": ["HTTP client", "HTTP server", "HTTP", "HTTPS", "event-driven", "streaming", "client", "server", "PSR-7", "async", "ReactPHP"],
"license": "MIT",
+ "authors": [
+ {
+ "name": "Christian Lück",
+ "homepage": "https://clue.engineering/",
+ "email": "christian@clue.engineering"
+ },
+ {
+ "name": "Cees-Jan Kiewiet",
+ "homepage": "https://wyrihaximus.net/",
+ "email": "reactphp@ceesjankiewiet.nl"
+ },
+ {
+ "name": "Jan Sorgalla",
+ "homepage": "https://sorgalla.com/",
+ "email": "jsorgalla@gmail.com"
+ },
+ {
+ "name": "Chris Boden",
+ "homepage": "https://cboden.dev/",
+ "email": "cboden@gmail.com"
+ }
+ ],
"require": {
"php": ">=5.3.0",
- "ringcentral/psr7": "^1.2",
- "react/socket": "^1.0 || ^0.8.3",
- "react/stream": "^1.0 || ^0.7.1",
- "react/promise": "^2.3 || ^1.2.1",
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
- "react/promise-stream": "^1.1"
- },
- "autoload": {
- "psr-4": {
- "React\\Http\\": "src"
- }
+ "psr/http-message": "^1.0",
+ "react/event-loop": "^1.0 || ^0.5",
+ "react/promise": "^2.3 || ^1.2.1",
+ "react/promise-stream": "^1.1",
+ "react/socket": "^1.6",
+ "react/stream": "^1.1",
+ "ringcentral/psr7": "^1.2"
},
"require-dev": {
"clue/block-react": "^1.1",
- "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35"
+ "clue/http-proxy-react": "^1.3",
+ "clue/reactphp-ssh-proxy": "^1.0",
+ "clue/socks-react": "^1.0",
+ "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
+ },
+ "autoload": {
+ "psr-4": { "React\\Http\\": "src" }
+ },
+ "autoload-dev": {
+ "psr-4": { "React\\Tests\\Http\\": "tests" }
}
}
diff --git a/php-react-http.spec b/php-react-http.spec
index 911e649..8bd37a6 100644
--- a/php-react-http.spec
+++ b/php-react-http.spec
@@ -12,8 +12,8 @@
%global github_owner reactphp
%global github_name http
-%global github_version 0.8.6
-%global github_commit 248202e57195d06a4375f6d2f5c5b9ff9da3ea9e
+%global github_version 1.1.0
+%global github_commit 754b0c18545d258922ffa907f3b18598280fdecd
%global composer_vendor react
%global composer_project http
@@ -23,6 +23,15 @@
# "clue/block-react": "^1.1"
%global clue_block_react_min_ver 1.1
%global clue_block_react_max_ver 2.0
+# "clue/http-proxy-react": "^1.3",
+%global clue_http_proxy_react_min_ver 1.3
+%global clue_http_proxy_react_max_ver 2.0
+# "clue/reactphp-ssh-proxy": "^1.0",
+%global clue_ssh_proxy_react_min_ver 1.0
+%global clue_ssh_proxy_react_max_ver 2.0
+# "clue/socks-react": "^1.0",
+%global clue_socks_react_min_ver 1.0
+%global clue_socks_react_max_ver 2.0
# "evenement/evenement": "^3.0 || ^2.0 || ^1.0"
%global evenement_min_ver 1.0
%global evenement_max_ver 4.0
@@ -32,15 +41,21 @@
# "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.3"
-%global react_socket_min_ver 0.8.3
+# "react/socket": "^1.6"
+%global react_socket_min_ver 1.6
%global react_socket_max_ver 2.0
-# "react/stream": "^1.0 || ^0.7.1"
-%global react_stream_min_ver 0.7.1
+# "react/stream": "^1.1"
+%global react_stream_min_ver 1.1
%global react_stream_max_ver 2.0
# "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",
+%global react_event_loop_min_ver 1.0
+%global react_event_loop__max_ver 2.0
+# "psr/http-message": "^1.0"
+%global psr_http_message_min_ver 1.0
+%global psr_http_message_max_ver 2.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -72,30 +87,40 @@ BuildArch: noarch
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: phpunit7
+%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
+# "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: phpunit9 >= 9.3
+%else
+%global phpunit %{_bindir}/phpunit
+BuildRequires: php-phpunit-PHPUnit >= 4.8.35
+%endif
%if %{with_range_dependencies}
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(clue/http-proxy-react) >= %{clue_http_proxy_react_min_ver} with php-composer(clue/http-proxy-react) < %{clue_http_proxy_react_max_ver})
+BuildRequires: (php-composer(clue/reactphp-ssh-proxy) >= %{clue_ssh_proxy_react_min_ver} with php-composer(clue/reactphp-ssh-proxy) < %{clue_ssh_proxy_react_max_ver})
+BuildRequires: (php-composer(clue/socks-react) >= %{clue_socks_react_min_ver} with php-composer(clue/socks-react) < %{clue_socks_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})
+BuildRequires: (php-composer(psr/http-message) >= %{psr_http_message_min_ver} with php-composer(psr/http-message) < %{psr_http_message_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(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) < %{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}
-BuildRequires: php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver}
-BuildRequires: php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver}
+BuildRequires: php-clue-block-react >= %{clue_block_react_min_ver}
+BuildRequires: php-clue-http-proxy-react >= %{clue_http_proxy_react_min_ver}
+BuildRequires: php-clue-reactphp-ssh-proxy >= %{clue_ssh_proxy_react_min_ver}
+BuildRequires: php-clue-socks-react >= %{clue_socks_react_min_ver}
+BuildRequires: php-evenement >= %{evenement_min_ver}
+BuildRequires: php-react-event-loop >= %{react_event_loop_min_ver}
+BuildRequires: php-react-promise-stream >= %{react_promise_stream_min_ver}
+BuildRequires: php-react-promise >= %{react_promise_min_ver}
+BuildRequires: php-react-socket >= %{react_socket_min_ver}
+BuildRequires: php-react-stream >= %{react_stream_min_ver}
+BuildRequires: php-ringcentral-psr7 >= %{ringcentral_psr7_min_ver}
+BuildRequires: php-psr-http-message >= %{psr_http_message_min_ver}
%endif
## phpcompatinfo (computed from version 0.8.6)
BuildRequires: php-date
@@ -110,24 +135,22 @@ BuildRequires: php-composer(fedora/autoloader)
Requires: php(language) >= %{php_min_ver}
%if %{with_range_dependencies}
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-stream) >= %{react_promise_stream_min_ver} with php-composer(react/promise-stream) < %{react_promise_stream_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})
+Requires: (php-composer(psr/http-message) >= %{psr_http_message_min_ver} with php-composer(psr/http-message) < %{psr_http_message_max_ver})
%else
-Requires: php-composer(evenement/evenement) < %{evenement_max_ver}
-Requires: php-composer(evenement/evenement) >= %{evenement_min_ver}
-Requires: php-composer(react/promise-stream) < %{react_promise_stream_max_ver}
-Requires: php-composer(react/promise-stream) >= %{react_promise_stream_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) < %{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}
-Requires: php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver}
-Requires: php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver}
+Requires: php-evenement >= %{evenement_min_ver}
+Requires: php-react-event-loop >= %{react_event_loop_min_ver}
+Requires: php-react-promise-stream >= %{react_promise_stream_min_ver}
+Requires: php-react-promise >= %{react_promise_min_ver}
+Requires: php-react-socket >= %{react_socket_min_ver}
+Requires: php-react-stream >= %{react_stream_min_ver}
+Requires: php-ringcentral-psr7 >= %{ringcentral_psr7_min_ver}
+Requires: php-psr-http-message >= %{psr_http_message_min_ver}
%endif
# phpcompatinfo (computed from version 0.8.6)
Requires: php-date
@@ -173,11 +196,13 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Dependencies::required(array(
'%{phpdir}/Evenement/autoload.php',
+ '%{phpdir}/React/EventLoop/autoload.php',
'%{phpdir}/React/Promise/autoload.php',
'%{phpdir}/React/Promise/Stream/autoload.php',
'%{phpdir}/React/Socket/autoload.php',
'%{phpdir}/React/Stream/autoload.php',
'%{phpdir}/RingCentral/Psr7/autoload.php',
+ '%{phpdir}/Psr/Http/Message/autoload.php',
));
AUTOLOAD
@@ -190,23 +215,27 @@ cp -rp src %{buildroot}%{phpdir}/React/Http
%check
%if %{with_tests}
: Create tests bootstrap
-cat <<'BOOTSTRAP' | tee bootstrap.php
+mkdir vendor
+cat <<'BOOTSTRAP' | tee vendor/autoload.php
<?php
require '%{buildroot}%{phpdir}/React/Http/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\Http\\', __DIR__.'/tests');
+\Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\Http\\', dirname(__DIR__).'/tests');
\Fedora\Autoloader\Dependencies::required(array(
'%{phpdir}/Clue/React/Block/autoload.php',
+ '%{phpdir}/Clue/React/SshProxy/autoload.php',
+ '%{phpdir}/Clue/React/Socks/autoload.php',
+ '%{phpdir}/Clue/React/HttpProxy/autoload.php',
));
BOOTSTRAP
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit7)
-for PHP_EXEC in "" php72 php73 php74; do
- if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
- $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
+for CMDARG in "php %{phpunit}" "php72 %{_bindir}/phpunit" php73 php74 php80; do
+ if which $CMDARG; then
+ set $CMDARG
+ $1 ${2:-%{_bindir}/phpunit9} --verbose \
|| RETURN_CODE=1
fi
done
@@ -225,6 +254,16 @@ exit $RETURN_CODE
%changelog
+* Wed Nov 4 2020 Remi Collet <remi@remirepo.net> - 1.1.0-1
+- update to 1.1.0
+- add dependency on react/event-loop
+- add dependency on psr/http-message
+- raise dependency on react/socket 1.6
+- raise dependency on react/stream 1.1
+- add build dependency on clue/http-proxy-react,
+ clue/reactphp-ssh-proxy and clue/socks-react
+- switch to phpunit9
+
* Sat Jun 06 2020 Shawn Iwinski <shawn@iwin.ski> - 0.8.6-1
- Update to 0.8.6 (RHBZ #1790302)
- Use PHPUnit 7