summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json6
-rw-r--r--php-react-dns.spec50
2 files changed, 29 insertions, 27 deletions
diff --git a/composer.json b/composer.json
index 0126343..1adf056 100644
--- a/composer.json
+++ b/composer.json
@@ -30,11 +30,11 @@
"react/cache": "^1.0 || ^0.6 || ^0.5",
"react/event-loop": "^1.2",
"react/promise": "^3.0 || ^2.7 || ^1.2.1",
- "react/promise-timer": "^1.8"
+ "react/promise-timer": "^1.9"
},
"require-dev": {
- "clue/block-react": "^1.2",
- "phpunit/phpunit": "^9.3 || ^4.8.35"
+ "phpunit/phpunit": "^9.3 || ^4.8.35",
+ "react/async": "^4 || ^3 || ^2"
},
"autoload": {
"psr-4": { "React\\Dns\\": "src" }
diff --git a/php-react-dns.spec b/php-react-dns.spec
index 9ea1c70..cf25a3d 100644
--- a/php-react-dns.spec
+++ b/php-react-dns.spec
@@ -12,17 +12,14 @@
%global github_owner reactphp
%global github_name dns
-%global github_version 1.9.0
-%global github_commit 6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb
+%global github_version 1.10.0
+%global github_commit a5427e7dfa47713e438016905605819d101f238c
%global composer_vendor react
%global composer_project dns
# "php": ">=5.3.0"
%global php_min_ver 5.3.0
-# "clue/block-react": "^1.2"
-%global clue_block_react_min_ver 1.2
-%global clue_block_react_max_ver 2.0
# "react/cache": "^1.0 || ^0.6 || ^0.5"
%global react_cache_min_ver 0.5
%global react_cache_max_ver 2.0
@@ -33,9 +30,12 @@
# ignore v3 not yet packaged
%global react_promise_min_ver 1.2.1
%global react_promise_max_ver 3.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/async": "^4 || ^3 || ^2",
+%global react_async_min_ver 2
+%global react_async_max_ver 5
# Build using "--without tests" to disable tests
%bcond_without tests
@@ -64,14 +64,12 @@ BuildRequires: php(language) >= %{php_min_ver}
%global phpunit %{_bindir}/phpunit9
BuildRequires: phpunit9 >= 9.3
%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(react/cache) >= %{react_cache_min_ver} with php-composer(react/cache) < %{react_cache_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-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/async) >= %{react_async_min_ver} with php-composer(react/async) < %{react_async_max_ver})
%else
-BuildRequires: php-clue-block-react < %{clue_block_react_max_ver}
-BuildRequires: php-clue-block-react >= %{clue_block_react_min_ver}
BuildRequires: php-react-cache < %{react_cache_max_ver}
BuildRequires: php-react-cache >= %{react_cache_min_ver}
BuildRequires: php-react-event-loop < %{react_event_loop_max_ver}
@@ -80,6 +78,8 @@ BuildRequires: php-react-promise-timer < %{react_promise_timer_max_ver}
BuildRequires: php-react-promise-timer >= %{react_promise_timer_min_ver}
BuildRequires: php-react-promise < %{react_promise_max_ver}
BuildRequires: php-react-promise >= %{react_promise_min_ver}
+BuildRequires: php-composer(react/async) < %{react_async_max_ver}
+BuildRequires: php-composer(react/async) >= %{react_async_min_ver}
%endif
## phpcompatinfo (computed from version 1.4.0)
BuildRequires: php-filter
@@ -88,9 +88,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}
@@ -137,22 +137,18 @@ Autoloader: %{phpdir}/React/Dns/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\\Dns\\', __DIR__);
+cat <<'AUTOLOAD' | tee -a src/autoload.php
-\Fedora\Autoloader\Dependencies::required(array(
+\Fedora\Autoloader\Dependencies::required([
'%{phpdir}/React/Cache/autoload.php',
'%{phpdir}/React/EventLoop/autoload.php',
'%{phpdir}/React/Promise/autoload.php',
'%{phpdir}/React/Promise/Timer/autoload.php',
-));
+]);
AUTOLOAD
@@ -168,7 +164,7 @@ mkdir vendor
cat <<'BOOTSTRAP' | tee vendor/autoload.php
<?php
require '%{buildroot}%{phpdir}/React/Dns/autoload.php';
-require '%{phpdir}/Clue/React/Block/autoload.php';
+require '%{phpdir}/React/Async/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('React\\Tests\\Dns\\', dirname(__DIR__).'/tests');
BOOTSTRAP
@@ -188,7 +184,7 @@ VER=$(php -r 'echo PHP_INT_SIZE;')
: Upstream tests
RETURN_CODE=0
-for CMDARG in "php %{phpunit}" php74 php80 php81; do
+for CMDARG in "php %{phpunit}" php80 php81 php82; do
if which $CMDARG; then
set $CMDARG
$1 ${2:-%{_bindir}/phpunit9} -d memory_limit=-1 \
@@ -212,6 +208,12 @@ exit $RETURN_CODE
%changelog
+* Fri Sep 23 2022 Remi Collet <remi@remirepo.net> - 1.10.0-1
+- update to 1.10.0
+- drop build dependency on clue/block-react
+- add build dependency on react/async
+- switch to classmap autoloader
+
* Mon Dec 20 2021 Remi Collet <remi@remirepo.net> - 1.9.0-1
- update to 1.9.0
- raise dependency on react/promise-timer 1.8