From 708a590ec6e8b1d55cde315a5bbc64c22754e2be Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Jan 2021 07:50:28 +0100 Subject: update to 4.6.0 enable curl support raise dependency on PHP 7.2 --- PHPINFO | 6 +- REFLECTION | 302 ++++++++++++++++++++++++++++++++++++++++++++++---- php-pecl-swoole4.spec | 16 ++- 3 files changed, 296 insertions(+), 28 deletions(-) diff --git a/PHPINFO b/PHPINFO index a229e42..66fc51b 100644 --- a/PHPINFO +++ b/PHPINFO @@ -3,8 +3,8 @@ swoole Swoole => enabled Author => Swoole Team -Version => 4.5.10 -Built => Dec 23 2020 00:00:00 +Version => 4.6.0 +Built => Jan 6 2021 00:00:00 coroutine => enabled trace_log => enabled epoll => enabled @@ -15,8 +15,10 @@ spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 1.1.1i FIPS 8 Dec 2020 +dtls => enabled http2 => enabled json => enabled +curl-native => enabled pcre => enabled zlib => 1.2.11 brotli => E16777225/D16777225 diff --git a/REFLECTION b/REFLECTION index 47ba931..982b499 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,9 +1,10 @@ -Extension [ extension #118 swoole version 4.5.10 ] { +Extension [ extension #119 swoole version 4.6.0 ] { - Dependencies { Dependency [ json (Required) ] Dependency [ mysqlnd (Required) ] Dependency [ sockets (Required) ] + Dependency [ curl (Required) ] } - INI { @@ -27,12 +28,12 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } - - Constants [359] { - Constant [ string SWOOLE_VERSION ] { 4.5.10 } - Constant [ int SWOOLE_VERSION_ID ] { 40510 } + - Constants [361] { + Constant [ string SWOOLE_VERSION ] { 4.6.0 } + Constant [ int SWOOLE_VERSION_ID ] { 40600 } Constant [ int SWOOLE_MAJOR_VERSION ] { 4 } - Constant [ int SWOOLE_MINOR_VERSION ] { 5 } - Constant [ int SWOOLE_RELEASE_VERSION ] { 10 } + Constant [ int SWOOLE_MINOR_VERSION ] { 6 } + Constant [ int SWOOLE_RELEASE_VERSION ] { 0 } Constant [ string SWOOLE_EXTRA_VERSION ] { } Constant [ bool SWOOLE_DEBUG ] { } Constant [ bool SWOOLE_HAVE_COMPRESSION ] { 1 } @@ -262,9 +263,11 @@ Extension [ extension #118 swoole version 4.5.10 ] { Constant [ int SWOOLE_HOOK_FILE ] { 256 } Constant [ int SWOOLE_HOOK_SLEEP ] { 512 } Constant [ int SWOOLE_HOOK_PROC ] { 1024 } - Constant [ int SWOOLE_HOOK_CURL ] { 268435456 } - Constant [ int SWOOLE_HOOK_BLOCKING_FUNCTION ] { 1073741824 } - Constant [ int SWOOLE_HOOK_ALL ] { 2147483647 } + Constant [ int SWOOLE_HOOK_CURL ] { 2048 } + Constant [ int SWOOLE_HOOK_NATIVE_CURL ] { 4096 } + Constant [ int SWOOLE_HOOK_BLOCKING_FUNCTION ] { 8192 } + Constant [ int SWOOLE_HOOK_SOCKETS ] { 16384 } + Constant [ int SWOOLE_HOOK_ALL ] { 2147481599 } Constant [ int SOCKET_ECANCELED ] { 125 } Constant [ int SWOOLE_HTTP_CLIENT_ESTATUS_CONNECT_FAILED ] { -1 } Constant [ int SWOOLE_HTTP_CLIENT_ESTATUS_REQUEST_TIMEOUT ] { -2 } @@ -431,6 +434,21 @@ Extension [ extension #118 swoole version 4.5.10 ] { Parameter #0 [ callable $callback ] } } + Function [ function swoole_coroutine_socketpair ] { + + - Parameters [3] { + Parameter #0 [ $domain ] + Parameter #1 [ $type ] + Parameter #2 [ $protocol ] + } + } + Function [ function swoole_test_kernel_coroutine ] { + + - Parameters [2] { + Parameter #0 [ $count ] + Parameter #1 [ $sleep_time ] + } + } Function [ function swoole_client_select ] { - Parameters [4] { @@ -477,6 +495,11 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Parameters [0] { } } + Function [ function swoole_clear_error ] { + + - Parameters [0] { + } + } Function [ function swoole_error_log ] { - Parameters [2] { @@ -697,7 +720,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } - - Classes [47] { + - Classes [53] { Class [ class Swoole\Exception extends Exception implements Throwable ] { - Constants [0] { @@ -1177,7 +1200,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } - Method [ static public method setaffinity ] { + Method [ static public method setAffinity ] { - Parameters [1] { Parameter #0 [ array $cpu_settings ] @@ -1194,7 +1217,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { Property [ private $callback ] } - - Methods [18] { + - Methods [20] { Method [ public method __construct ] { - Parameters [4] { @@ -1211,6 +1234,21 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } + Method [ public method setPriority ] { + + - Parameters [2] { + Parameter #0 [ $which ] + Parameter #1 [ $priority ] + } + } + + Method [ public method getPriority ] { + + - Parameters [1] { + Parameter #0 [ $which ] + } + } + Method [ public method set ] { - Parameters [1] { @@ -1661,7 +1699,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { } - Static methods [9] { - Method [ static public method set ] { + Method [ static public method set ] { - Parameters [1] { Parameter #0 [ array $settings ] @@ -1936,7 +1974,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Static properties [0] { } - - Static methods [33] { + - Static methods [35] { Method [ static public method create ] { - Parameters [2] { @@ -1959,6 +1997,12 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } + Method [ static public method getOptions ] { + + - Parameters [0] { + } + } + Method [ static public method exists ] { - Parameters [1] { @@ -2026,6 +2070,15 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } + Method [ static public method printBackTrace ] { + + - Parameters [3] { + Parameter #0 [ $cid ] + Parameter #1 [ $options ] + Parameter #2 [ $limit ] + } + } + Method [ static public method getElapsed ] { - Parameters [1] { @@ -2793,7 +2846,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Properties [0] { } - - Methods [4] { + - Methods [5] { Method [ public method add ] { - Parameters [2] { @@ -2818,6 +2871,12 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } + Method [ public method getOptions ] { + + - Parameters [0] { + } + } + Method [ public method start ] { - Parameters [0] { @@ -2935,6 +2994,63 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } + Class [ class Swoole\Coroutine\Curl\Exception extends Swoole\Exception implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [10] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + Class [ class Swoole\Coroutine\Socket ] { - Constants [0] { @@ -2946,8 +3062,11 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Static methods [0] { } - - Properties [3] { + - Properties [6] { Property [ public $fd ] + Property [ public $domain ] + Property [ public $type ] + Property [ public $protocol ] Property [ public $errCode ] Property [ public $errMsg ] } @@ -5493,7 +5612,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Parameters [3] { Parameter #0 [ $host ] Parameter #1 [ $port ] - Parameter #2 [ $ssl ] + Parameter #2 [ $open_ssl ] } } @@ -6101,8 +6220,9 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } - - Properties [4] { + - Properties [5] { Property [ public $data ] + Property [ public $dispatch_time ] Property [ public $id ] Property [ public $worker_id ] Property [ public $flags ] @@ -6118,6 +6238,117 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } + Class [ class Swoole\Server\Event ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ public $reactor_id ] + Property [ public $fd ] + Property [ public $dispatch_time ] + Property [ public $data ] + } + + - Methods [0] { + } + } + + Class [ class Swoole\Server\Packet ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [5] { + Property [ public $server_socket ] + Property [ public $server_port ] + Property [ public $dispatch_time ] + Property [ public $address ] + Property [ public $port ] + } + + - Methods [0] { + } + } + + Class [ class Swoole\Server\PipeMessage ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [3] { + Property [ public $source_worker_id ] + Property [ public $dispatch_time ] + Property [ public $data ] + } + + - Methods [0] { + } + } + + Class [ class Swoole\Server\StatusInfo ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [5] { + Property [ public $worker_id ] + Property [ public $worker_pid ] + Property [ public $status ] + Property [ public $exit_code ] + Property [ public $signal ] + } + + - Methods [0] { + } + } + + Class [ class Swoole\Server\TaskResult ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ public $task_id ] + Property [ public $task_worker_id ] + Property [ public $dispatch_time ] + Property [ public $data ] + } + + - Methods [0] { + } + } + Class [ class Swoole\Connection\Iterator implements Iterator, Traversable, ArrayAccess, Countable ] { - Constants [0] { @@ -6293,7 +6524,13 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Static properties [0] { } - - Static methods [0] { + - Static methods [1] { + Method [ static public method create ] { + + - Parameters [1] { + Parameter #0 [ $options ] + } + } } - Properties [9] { @@ -6308,7 +6545,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { Property [ public $tmpfiles ] } - - Methods [4] { + - Methods [6] { Method [ public method rawContent ] { - Parameters [0] { @@ -6327,6 +6564,19 @@ Extension [ extension #118 swoole version 4.5.10 ] { } } + Method [ public method parse ] { + + - Parameters [1] { + Parameter #0 [ $data ] + } + } + + Method [ public method isCompleted ] { + + - Parameters [0] { + } + } + Method [ public method __destruct ] { - Parameters [0] { @@ -6361,13 +6611,19 @@ Extension [ extension #118 swoole version 4.5.10 ] { Property [ public $trailer ] } - - Methods [21] { + - Methods [22] { Method [ public method initHeader ] { - Parameters [0] { } } + Method [ public method isWritable ] { + + - Parameters [0] { + } + } + Method [ public method cookie ] { - Parameters [9] { @@ -6434,7 +6690,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Parameters [3] { Parameter #0 [ $key ] Parameter #1 [ $value ] - Parameter #2 [ $ucwords ] + Parameter #2 [ $format ] } } @@ -6443,7 +6699,7 @@ Extension [ extension #118 swoole version 4.5.10 ] { - Parameters [3] { Parameter #0 [ $key ] Parameter #1 [ $value ] - Parameter #2 [ $ucwords ] + Parameter #2 [ $format ] } } diff --git a/php-pecl-swoole4.spec b/php-pecl-swoole4.spec index a5d5710..74c4023 100644 --- a/php-pecl-swoole4.spec +++ b/php-pecl-swoole4.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-swoole4 # -# Copyright (c) 2013-2020 Remi Collet +# Copyright (c) 2013-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -27,7 +27,7 @@ %global with_brotli 0 %endif -%global upstream_version 4.5.10 +%global upstream_version 4.6.0 #global upstream_prever RC2 @@ -44,20 +44,23 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upst BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?dtsprefix}gcc-c++ -BuildRequires: %{?scl_prefix}php-devel > 7.1 +BuildRequires: %{?scl_prefix}php-devel >= 7.2 BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-curl BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?scl_prefix}php-sockets BuildRequires: %{?scl_prefix}php-mysqlnd BuildRequires: pcre-devel BuildRequires: openssl-devel >= 1.0.2 BuildRequires: zlib-devel +BuildRequires: libcurl-devel %if %{with_brotli} BuildRequires: brotli-devel %endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} +Requires: %{?scl_prefix}php-curl%{?_isa} Requires: %{?scl_prefix}php-json%{?_isa} Requires: %{?scl_prefix}php-sockets%{?_isa} Requires: %{?scl_prefix}php-mysqlnd%{?_isa} @@ -196,6 +199,7 @@ peclbuild() { --enable-http2 \ --enable-mysqlnd \ --enable-swoole-json \ + --enable-swoole-curl \ --with-libdir=%{_lib} \ --with-php-config=$1 @@ -267,6 +271,7 @@ fi %check OPT="--no-php-ini" +[ -f %{php_extdir}/curl.so ] && OPT="$OPT -d extension=curl.so" [ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so" [ -f %{php_extdir}/sockets.so ] && OPT="$OPT -d extension=sockets.so" [ -f %{php_extdir}/mysqlnd.so ] && OPT="$OPT -d extension=mysqlnd.so" @@ -318,6 +323,11 @@ cd ../ZTS %changelog +* Wed Jan 6 2021 Remi Collet - 4.6.0-1 +- update to 4.6.0 +- enable curl support +- raise dependency on PHP 7.2 + * Wed Dec 23 2020 Remi Collet - 4.5.10-1 - update to 4.5.10 -- cgit