summaryrefslogtreecommitdiffstats
path: root/php-react-socket.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-12-16 15:39:33 +0100
committerRemi Collet <remi@remirepo.net>2019-12-16 15:39:33 +0100
commite5479471e7b899d12bb652abe9cc2cee37bdf6b7 (patch)
tree6a827f6245bb35e0ee29f2522c2f0a45775e1c08 /php-react-socket.spec
parentc4e43dbc93d3800def37486e6701d0a1052ba5af (diff)
v1.3.0 from Fedora
Diffstat (limited to 'php-react-socket.spec')
-rw-r--r--php-react-socket.spec59
1 files changed, 41 insertions, 18 deletions
diff --git a/php-react-socket.spec b/php-react-socket.spec
index d1d3248..94f607f 100644
--- a/php-react-socket.spec
+++ b/php-react-socket.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-react-socket
#
-# Copyright (c) 2017-2018 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2017-2019 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner reactphp
%global github_name socket
-%global github_version 0.8.12
-%global github_commit 7f7e6c56ccda7418a1a264892a625f38a5bdee0c
+%global github_version 1.3.0
+%global github_commit 10f0629ec83ea0fa22597f348623f554227e3ca0
%global composer_vendor react
%global composer_project socket
@@ -24,12 +24,11 @@
%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: Restricted to one major version
-%global evenement_min_ver 2.0
-%global evenement_max_ver 3.0
-# "react/dns": "^0.4.13"
+%global evenement_min_ver 1.0
+%global evenement_max_ver 4.0
+# "react/dns": "^1.0 || ^0.4.13"
%global react_dns_min_ver 0.4.13
-%global react_dns_max_ver 1.0
+%global react_dns_max_ver 2.0
# "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5"
%global react_event_loop_min_ver 0.3.5
%global react_event_loop_max_ver 2.0
@@ -39,8 +38,8 @@
# "react/promise-timer": "^1.4.0"
%global react_promise_timer_min_ver 1.4.0
%global react_promise_timer_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
# Build using "--without tests" to disable tests
@@ -50,20 +49,24 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: Async, streaming plaintext TCP/IP and secure TLS socket server
-Group: Development/Libraries
License: MIT
URL: https://reactphp.org/socket/
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+# Improve test suite to exclude TLS 1.3 tests on PHP 7.3
+# https://github.com/reactphp/socket/commit/198690e6b736d3501cf272fa9e4ed59f3ee08a34
+# https://github.com/reactphp/socket/commit/198690e6b736d3501cf272fa9e4ed59f3ee08a34.patch
+Patch0: %{name}.198690e.patch
+
BuildArch: noarch
# Tests
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: phpunit6
%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})
@@ -88,10 +91,12 @@ BuildRequires: php-composer(react/promise-timer) < %{react_promise_timer_max_ve
BuildRequires: php-composer(react/stream) < %{react_stream_max_ver}
BuildRequires: php-composer(react/stream) >= %{react_stream_min_ver}
%endif
-## phpcompatinfo (computed from version 0.8.12)
+## phpcompatinfo (computed from version 1.3.0)
BuildRequires: php-filter
BuildRequires: php-openssl
BuildRequires: php-pcre
+BuildRequires: php-reflection
+BuildRequires: php-sockets
BuildRequires: php-spl
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
@@ -120,12 +125,15 @@ Requires: php-composer(react/promise-timer) < %{react_promise_timer_max_ve
Requires: php-composer(react/stream) < %{react_stream_max_ver}
Requires: php-composer(react/stream) >= %{react_stream_min_ver}
%endif
-# phpcompatinfo (computed from version 0.8.12)
+# phpcompatinfo (computed from version 1.3.0)
Requires: php-filter
+Requires: php-pcre
+Requires: php-sockets
Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
-# packages have been merged (not provided as class names are different)
+
+# Packages have been merged (not provided as class names are different)
Obsoletes: php-react-socket-client < 0.5
# Composer
@@ -143,6 +151,9 @@ Autoloader: %{phpdir}/React/Socket/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
+# Improve test suite to exclude TLS 1.3 tests on PHP 7.3
+%patch0 -p1
+
%build
: Create autoloader
@@ -189,10 +200,18 @@ BOOTSTRAP
: Skip test requiring network access
rm -f tests/IntegrationTest.php
+: Skip "Class "React\Dns\Resolver\Resolver" is declared "final" and cannot be mocked" warnings
+: Why is PHPUnit 6 failing the test run for this even if convertWarningsToExceptions="false"?
+rm -f tests/DnsConnectorTest.php
+sed \
+ -e 's/function testConnectorUsesGivenResolverInstance/function SKIP_testConnectorUsesGivenResolverInstance/' \
+ -e 's/function testConnectorUsesResolvedHostnameIfDnsIsUsed/function SKIP_testConnectorUsesResolvedHostnameIfDnsIsUsed/' \
+ -i tests/ConnectorTest.php
+
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php54 php55} php70 php71 php72 php73; do
+PHPUNIT=$(which phpunit6)
+for PHP_EXEC in "" php71 php72 php73 php74; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -213,6 +232,10 @@ exit $RETURN_CODE
%changelog
+* Sat Dec 14 2019 Shawn Iwinski <shawn@iwin.ski> - 1.3.0-1
+- Update to 1.3.0 (RHBZ #1600308)
+- Use PHPUnit 6
+
* Tue Jul 3 2018 Remi Collet <remi@remirepo.net> - 0.8.12-3
- obsolete php-react-socket-client (merged)