summaryrefslogtreecommitdiffstats
path: root/php-react-socket.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-react-socket.spec')
-rw-r--r--php-react-socket.spec64
1 files changed, 33 insertions, 31 deletions
diff --git a/php-react-socket.spec b/php-react-socket.spec
index e965408..ada3b67 100644
--- a/php-react-socket.spec
+++ b/php-react-socket.spec
@@ -12,17 +12,14 @@
%global github_owner reactphp
%global github_name socket
-%global github_version 1.11.0
-%global github_commit f474156aaab4f09041144fa8b57c7d70aed32a1c
+%global github_version 1.12.0
+%global github_commit 81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b
%global composer_vendor react
%global composer_project socket
# "php": ">=5.3.0"
%global php_min_ver 5.3.0
-# "clue/block-react": "^1.5"
-%global clue_block_react_min_ver 1.5
-%global clue_block_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,14 +29,17 @@
# "react/event-loop": "^1.2"
%global react_event_loop_min_ver 1.2
%global react_event_loop_max_ver 2.0
-# "react/promise": "^2.6.0 || ^1.2.1"
+# "react/promise": "^3 || ^2.6 || ^1.2.1"
%global react_promise_min_ver 1.2.1
-%global react_promise_max_ver 3.0
-# "react/promise-stream": "^1.2"
-%global react_promise_stream_min_ver 1.2
+%global react_promise_max_ver 4
+# "react/async": "^4 || ^3 || ^2",
+%global react_async_min_ver 2
+%global react_async_max_ver 5
+# "react/promise-stream": "^1.4"
+%global react_promise_stream_min_ver 1.4
%global react_promise_stream_max_ver 2.0
-# "react/promise-timer": "^1.8"
-%global react_promise_timer_min_ver 1.8
+# "react/promise-timer": "^1.9"
+%global react_promise_timer_min_ver 1.9
%global react_promise_timer_max_ver 2.0
# "react/stream": "^1.2"
%global react_stream_min_ver 1.2
@@ -51,7 +51,7 @@
%global phpunit_exec phpunit9
# Build using "--without tests" to disable tests
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
# Range dependencies supported?
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
@@ -77,22 +77,20 @@ Source1: %{name}-get-source.sh
BuildArch: noarch
# Tests
-%if %{with_tests}
+%if %{with tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: %{phpunit_require} >= %{phpunit_min_ver}
%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(evenement/evenement) >= %{evenement_min_ver} with php-composer(evenement/evenement) < %{evenement_max_ver})
BuildRequires: (php-composer(react/dns) >= %{react_dns_min_ver} with php-composer(react/dns) < %{react_dns_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/async) >= %{react_async_min_ver} with php-composer(react/async) < %{react_async_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-timer) >= %{react_promise_timer_min_ver} with php-composer(react/promise-timer) < %{react_promise_timer_max_ver})
BuildRequires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver})
BuildRequires: (php-composer(react/stream) >= %{react_stream_min_ver} with php-composer(react/stream) < %{react_stream_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/dns) >= %{react_dns_min_ver}
@@ -103,6 +101,8 @@ BuildRequires: php-composer(react/promise) < %{react_promise_max_ver}
BuildRequires: php-composer(react/promise) >= %{react_promise_min_ver}
BuildRequires: php-composer(react/promise-timer) >= %{react_promise_timer_min_ver}
BuildRequires: php-composer(react/promise-timer) < %{react_promise_timer_max_ver}
+BuildRequires: php-composer(react/async) < %{react_async_max_ver}
+BuildRequires: php-composer(react/async) >= %{react_async_min_ver}
BuildRequires: php-composer(react/promise-stream) >= %{react_promise_stream_min_ver}
BuildRequires: php-composer(react/promise-stream) < %{react_promise_stream_max_ver}
BuildRequires: php-composer(react/stream) < %{react_stream_max_ver}
@@ -114,9 +114,9 @@ BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-sockets
BuildRequires: php-spl
-## Autoloader
-BuildRequires: php-composer(fedora/autoloader)
%endif
+## Autoloader
+BuildRequires: php-fedora-autoloader-devel
# composer.json
Requires: php(language) >= %{php_min_ver}
@@ -170,15 +170,11 @@ Autoloader: %{phpdir}/React/Socket/autoload.php
%build
: Create autoloader
-cat <<'AUTOLOAD' | tee src/autoload.php
-<?php
-/**
- * Autoloader for %{name} and its' dependencies
- * (created by %{name}-%{version}-%{release}).
- */
-require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
+phpab --template fedora \
+ --output src/autoload.php \
+ src
-\Fedora\Autoloader\Autoload::addPsr4('React\\Socket\\', __DIR__);
+cat <<'AUTOLOAD' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required(array(
'%{phpdir}/Evenement/autoload.php',
@@ -197,7 +193,7 @@ cp -rp src %{buildroot}%{phpdir}/React/Socket
%check
-%if %{with_tests}
+%if %{with tests}
: Create tests bootstrap
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
@@ -205,10 +201,10 @@ require '%{buildroot}%{phpdir}/React/Socket/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\Socket\\\\', __DIR__.'/tests');
-\Fedora\Autoloader\Dependencies::required(array(
- '%{phpdir}/Clue/React/Block/autoload.php',
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/React/Async/autoload.php',
'%{phpdir}/React/Promise/Stream/autoload.php',
-));
+]);
BOOTSTRAP
: Skip test requiring network access
@@ -222,7 +218,7 @@ FILTER="--filter '^((?!(testClientUsesTls10WhenCryptoMethodIsExplicitlyConfigure
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which %{phpunit_exec})
-for PHP_EXEC in "" php74 php80 php81; do
+for PHP_EXEC in "" php80 php81 php82; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT $FILTER \
--bootstrap bootstrap.php \
@@ -245,6 +241,12 @@ exit $RETURN_CODE
%changelog
+* Fri Sep 23 2022 Remi Collet <remi@remirepo.net> - 1.12.0-1
+- update to 1.12.0
+- drop build dependency on clue/block-react
+- add build dependency on react/async
+- switch to classmap autoloader
+
* Fri Jan 14 2022 Remi Collet <remi@remirepo.net> - 1.11.0-1
- update to 1.11.0
- raise dependency on react/promise-timer 1.8