From 2571d24490337443b4c9e138a3ee2337afdaa0dc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 10 Apr 2018 14:55:07 +0200 Subject: update to 2.1.2 add PostgreSQL coroutine client on Fedora 24+ enable trace log open https://github.com/swoole/swoole-src/issues/1558 broken build with PHP 7.0 --- REFLECTION | 380 ++++++++++++++++++++++++++++++++++++++++++++++---- php-pecl-swoole2.spec | 26 +++- 2 files changed, 376 insertions(+), 30 deletions(-) diff --git a/REFLECTION b/REFLECTION index 052f31f..2a8ef5b 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #144 swoole version 2.1.1 ] { +Extension [ extension #147 swoole version 2.1.2 ] { - INI { Entry [ swoole.aio_thread_num ] @@ -21,7 +21,7 @@ Extension [ extension #144 swoole version 2.1.1 ] { } } - - Constants [121] { + - Constants [151] { Constant [ integer SWOOLE_BASE ] { 4 } Constant [ integer SWOOLE_THREAD ] { 2 } Constant [ integer SWOOLE_PROCESS ] { 3 } @@ -66,7 +66,7 @@ Extension [ extension #144 swoole version 2.1.1 ] { Constant [ integer SWOOLE_DTLSv1_CLIENT_METHOD ] { 17 } Constant [ integer SWOOLE_EVENT_READ ] { 512 } Constant [ integer SWOOLE_EVENT_WRITE ] { 1024 } - Constant [ string SWOOLE_VERSION ] { 2.1.1 } + Constant [ string SWOOLE_VERSION ] { 2.1.2 } Constant [ integer SWOOLE_ERROR_MALLOC_FAIL ] { 501 } Constant [ integer SWOOLE_ERROR_SYSTEM_CALL_FAIL ] { 502 } Constant [ integer SWOOLE_ERROR_PHP_FATAL_ERROR ] { 503 } @@ -118,6 +118,33 @@ Extension [ extension #144 swoole version 2.1.1 ] { Constant [ integer SWOOLE_ERROR_SERVER_NO_IDLE_WORKER ] { 9007 } Constant [ integer SWOOLE_ERROR_SERVER_ONLY_START_ONE ] { 9008 } Constant [ integer SWOOLE_ERROR_SERVER_WORKER_EXIT_TIMEOUT ] { 9009 } + Constant [ integer SWOOLE_TRACE_SERVER ] { 2 } + Constant [ integer SWOOLE_TRACE_CLIENT ] { 4 } + Constant [ integer SWOOLE_TRACE_BUFFER ] { 8 } + Constant [ integer SWOOLE_TRACE_CONN ] { 16 } + Constant [ integer SWOOLE_TRACE_EVENT ] { 32 } + Constant [ integer SWOOLE_TRACE_WORKER ] { 64 } + Constant [ integer SWOOLE_TRACE_REACTOR ] { 256 } + Constant [ integer SWOOLE_TRACE_PHP ] { 512 } + Constant [ integer SWOOLE_TRACE_HTTP2 ] { 1024 } + Constant [ integer SWOOLE_TRACE_EOF_PROTOCOL ] { 2048 } + Constant [ integer SWOOLE_TRACE_LENGTH_PROTOCOL ] { 4096 } + Constant [ integer SWOOLE_TRACE_CLOSE ] { 8192 } + Constant [ integer SWOOLE_TRACE_HTTP_CLIENT ] { 16384 } + Constant [ integer SWOOLE_TRACE_COROUTINE ] { 32768 } + Constant [ integer SWOOLE_TRACE_REDIS_CLIENT ] { 65536 } + Constant [ integer SWOOLE_TRACE_MYSQL_CLIENT ] { 131072 } + Constant [ integer SWOOLE_TRACE_AIO ] { 262144 } + Constant [ integer SWOOLE_TRACE_ALL ] { 4294967295 } + Constant [ integer SWOOLE_LOG_DEBUG ] { 0 } + Constant [ integer SWOOLE_LOG_TRACE ] { 1 } + Constant [ integer SWOOLE_LOG_INFO ] { 2 } + Constant [ integer SWOOLE_LOG_NOTICE ] { 3 } + Constant [ integer SWOOLE_LOG_WARNING ] { 4 } + Constant [ integer SWOOLE_LOG_ERROR ] { 5 } + Constant [ integer SWOOLE_IPC_NONE ] { 0 } + Constant [ integer SWOOLE_IPC_UNIXSOCK ] { 1 } + Constant [ integer SWOOLE_IPC_SOCKET ] { 3 } Constant [ integer SWOOLE_REDIS_MODE_MULTI ] { 0 } Constant [ integer SWOOLE_REDIS_MODE_PIPELINE ] { 1 } Constant [ integer SWOOLE_REDIS_TYPE_NOT_FOUND ] { 0 } @@ -126,6 +153,9 @@ Extension [ extension #144 swoole version 2.1.1 ] { Constant [ integer SWOOLE_REDIS_TYPE_LIST ] { 3 } Constant [ integer SWOOLE_REDIS_TYPE_ZSET ] { 4 } Constant [ integer SWOOLE_REDIS_TYPE_HASH ] { 5 } + Constant [ integer SW_PGSQL_ASSOC ] { 1 } + Constant [ integer SW_PGSQL_NUM ] { 2 } + Constant [ integer SW_PGSQL_BOTH ] { 3 } Constant [ integer SWOOLE_AIO_BASE ] { 0 } Constant [ integer SWOOLE_AIO_LINUX ] { 1 } Constant [ integer SWOOLE_FILELOCK ] { 2 } @@ -210,8 +240,21 @@ Extension [ extension #144 swoole version 2.1.1 ] { } Function [ function swoole_event_cycle ] { - - Parameters [1] { + - Parameters [2] { Parameter #0 [ $callback ] + Parameter #1 [ $before ] + } + } + Function [ function swoole_event_dispatch ] { + + - Parameters [0] { + } + } + Function [ function swoole_event_isset ] { + + - Parameters [2] { + Parameter #0 [ $fd ] + Parameter #1 [ $events ] } } Function [ function swoole_timer_after ] { @@ -367,7 +410,7 @@ Extension [ extension #144 swoole version 2.1.1 ] { } } - - Classes [41] { + - Classes [44] { Class [ class Swoole\Server ] { - Constants [0] { @@ -687,8 +730,8 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ public method sendMessage ] { - Parameters [2] { - Parameter #0 [ $dst_worker_id ] - Parameter #1 [ $data ] + Parameter #0 [ $message ] + Parameter #1 [ $dst_worker_id ] } } @@ -841,8 +884,9 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ static public method cycle ] { - - Parameters [1] { + - Parameters [2] { Parameter #0 [ $callback ] + Parameter #1 [ $before ] } } } @@ -1370,11 +1414,15 @@ Extension [ extension #144 swoole version 2.1.1 ] { - Static methods [0] { } - - Properties [4] { + - Properties [8] { Property [ public $errCode ] Property [ public $sock ] + Property [ public $reuse ] + Property [ public $reuseCount ] Property [ public $type ] + Property [ public $id ] Property [ public $setting ] + Property [ public $connected ] } - Methods [19] { @@ -1409,7 +1457,8 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ public method recv ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ $timeout ] } } @@ -1523,7 +1572,7 @@ Extension [ extension #144 swoole version 2.1.1 ] { Property [ public $errMsg ] } - - Methods [153] { + - Methods [154] { Method [ public method __construct ] { - Parameters [1] { @@ -1555,6 +1604,13 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ public method recv ] { } + Method [ public method request ] { + + - Parameters [1] { + Parameter #0 [ array $params ] + } + } + Method [ public method close ] { } @@ -2220,6 +2276,115 @@ Extension [ extension #144 swoole version 2.1.1 ] { } } + Class [ class Swoole\Coroutine\PostgreSQL ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [12] { + Method [ public method __construct ] { + + - Parameters [0] { + } + } + + Method [ public method connect ] { + + - Parameters [1] { + Parameter #0 [ $conninfo ] + } + } + + Method [ public method query ] { + + - Parameters [1] { + Parameter #0 [ $query ] + } + } + + Method [ public method fetchAll ] { + + - Parameters [2] { + Parameter #0 [ $result ] + Parameter #1 [ $result_type ] + } + } + + Method [ public method affectedRows ] { + + - Parameters [1] { + Parameter #0 [ $result ] + } + } + + Method [ public method numRows ] { + + - Parameters [1] { + Parameter #0 [ $result ] + } + } + + Method [ public method metaData ] { + + - Parameters [1] { + Parameter #0 [ $table_name ] + } + } + + Method [ public method fetchObject ] { + + - Parameters [5] { + Parameter #0 [ $result ] + Parameter #1 [ $row ] + Parameter #2 [ $class_name ] + Parameter #3 [ $l ] + Parameter #4 [ $ctor_params ] + } + } + + Method [ public method fetchAssoc ] { + + - Parameters [2] { + Parameter #0 [ $result ] + Parameter #1 [ $row ] + } + } + + Method [ public method fetchArray ] { + + - Parameters [3] { + Parameter #0 [ $result ] + Parameter #1 [ $row ] + Parameter #2 [ $result_type ] + } + } + + Method [ public method fetchRow ] { + + - Parameters [3] { + Parameter #0 [ $result ] + Parameter #1 [ $row ] + Parameter #2 [ $result_type ] + } + } + + Method [ public method __destruct ] { + + - Parameters [0] { + } + } + } + } + Class [ class Swoole\Coroutine\MySQL ] { - Constants [0] { @@ -2446,9 +2611,14 @@ Extension [ extension #144 swoole version 2.1.1 ] { - Static methods [0] { } - - Properties [12] { - Property [ public $type ] + - Properties [17] { Property [ public $errCode ] + Property [ public $sock ] + Property [ public $reuse ] + Property [ public $reuseCount ] + Property [ public $type ] + Property [ public $setting ] + Property [ public $connected ] Property [ public $statusCode ] Property [ public $host ] Property [ public $port ] @@ -2580,7 +2750,8 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ public method recv ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ $timeout ] } } @@ -2609,7 +2780,7 @@ Extension [ extension #144 swoole version 2.1.1 ] { - Static properties [0] { } - - Static methods [15] { + - Static methods [17] { Method [ static public method create ] { - Parameters [1] { @@ -2688,6 +2859,22 @@ Extension [ extension #144 swoole version 2.1.1 ] { } } + Method [ static public method readFile ] { + + - Parameters [1] { + Parameter #0 [ $filename ] + } + } + + Method [ static public method writeFile ] { + + - Parameters [3] { + Parameter #0 [ $filename ] + Parameter #1 [ $data ] + Parameter #2 [ $flags ] + } + } + Method [ static public method gethostbyname ] { - Parameters [2] { @@ -2969,7 +3156,7 @@ Extension [ extension #144 swoole version 2.1.1 ] { Property [ public $id ] } - - Methods [15] { + - Methods [16] { Method [ public method __construct ] { - Parameters [3] { @@ -2992,6 +3179,13 @@ Extension [ extension #144 swoole version 2.1.1 ] { } } + Method [ public method setBlocking ] { + + - Parameters [1] { + Parameter #0 [ $blocking ] + } + } + Method [ public method useQueue ] { - Parameters [2] { @@ -3076,6 +3270,60 @@ Extension [ extension #144 swoole version 2.1.1 ] { } } + Class [ class Swoole\Process\Pool ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [5] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $worker_num ] + Parameter #1 [ $ipc_type ] + Parameter #2 [ $msgqueue_key ] + } + } + + Method [ public method __destruct ] { + + - Parameters [0] { + } + } + + Method [ public method on ] { + + - Parameters [2] { + Parameter #0 [ $event_name ] + Parameter #1 [ $callback ] + } + } + + Method [ public method listen ] { + + - Parameters [2] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + } + } + + Method [ public method start ] { + + - Parameters [0] { + } + } + } + } + Class [ class Swoole\Table implements ArrayAccess, Iterator, Traversable, Countable ] { - Constants [3] { @@ -3848,8 +4096,8 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ public method sendMessage ] { - Parameters [2] { - Parameter #0 [ $dst_worker_id ] - Parameter #1 [ $data ] + Parameter #0 [ $message ] + Parameter #1 [ $dst_worker_id ] } } @@ -4506,8 +4754,8 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ public method sendMessage ] { - Parameters [2] { - Parameter #0 [ $dst_worker_id ] - Parameter #1 [ $data ] + Parameter #0 [ $message ] + Parameter #1 [ $dst_worker_id ] } } @@ -4898,7 +5146,7 @@ Extension [ extension #144 swoole version 2.1.1 ] { - Properties [0] { } - - Methods [5] { + - Methods [7] { Method [ public method __construct ] { - Parameters [1] { @@ -4925,7 +5173,83 @@ Extension [ extension #144 swoole version 2.1.1 ] { } } - Method [ public method full ] { + Method [ public method count ] { + + - Parameters [0] { + } + } + + Method [ public method isFull ] { + + - Parameters [0] { + } + } + + Method [ public method isEmpty ] { + + - Parameters [0] { + } + } + } + } + + Class [ class Swoole\MsgQueue ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [7] { + Method [ public method __construct ] { + + - Parameters [1] { + Parameter #0 [ $len ] + } + } + + Method [ public method __destruct ] { + + - Parameters [0] { + } + } + + Method [ public method push ] { + + - Parameters [2] { + Parameter #0 [ $data ] + Parameter #1 [ $type ] + } + } + + Method [ public method pop ] { + + - Parameters [1] { + Parameter #0 [ $type ] + } + } + + Method [ public method setBlocking ] { + + - Parameters [1] { + Parameter #0 [ $blocking ] + } + } + + Method [ public method stats ] { + + - Parameters [0] { + } + } + + Method [ public method destory ] { - Parameters [0] { } @@ -5193,15 +5517,15 @@ Extension [ extension #144 swoole version 2.1.1 ] { } - Properties [9] { - Property [ public $type ] Property [ public $errCode ] - Property [ public $statusCode ] - Property [ public $host ] - Property [ public $port ] Property [ public $sock ] Property [ public $reuse ] Property [ public $reuseCount ] + Property [ public $type ] Property [ public $setting ] + Property [ public $connected ] + Property [ public $host ] + Property [ public $port ] } - Methods [8] { @@ -5743,8 +6067,8 @@ Extension [ extension #144 swoole version 2.1.1 ] { Method [ public method sendMessage ] { - Parameters [2] { - Parameter #0 [ $dst_worker_id ] - Parameter #1 [ $data ] + Parameter #0 [ $message ] + Parameter #1 [ $dst_worker_id ] } } diff --git a/php-pecl-swoole2.spec b/php-pecl-swoole2.spec index 9d6bc04..6870538 100644 --- a/php-pecl-swoole2.spec +++ b/php-pecl-swoole2.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-swoole2 # -# Copyright (c) 2013-2017 Remi Collet +# Copyright (c) 2013-2018 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -25,16 +25,24 @@ %global ini_name 40-%{pecl_name}.ini %endif +# BUT see https://github.com/swoole/swoole-src/issues/1558 +%if 0%{?fedora} >= 24 || 0%{?rhel} >= 8 +%global with_pgsql 1 +%else +%global with_pgsql 0 +%endif + %if 0%{?fedora} >= 22 || 0%{?rhel} >= 6 %global with_nghttpd2 1 %else %global with_nghttpd2 0 %endif + %global with_hiredis 1 Summary: PHP's asynchronous concurrent distributed networking framework Name: %{?sub_prefix}php-pecl-%{pecl_name}2 -Version: 2.1.1 +Version: 2.1.2 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD URL: http://pecl.php.net/package/%{pecl_name} @@ -50,6 +58,9 @@ BuildRequires: openssl-devel %if %{with_nghttpd2} BuildRequires: libnghttp2-devel %endif +%if %{with_pgsql} +BuildRequires: postgresql-devel > 9.5 +%endif %if %{with_hiredis} BuildRequires: hiredis-devel %endif @@ -179,12 +190,16 @@ peclbuild() { %configure \ --with-swoole \ --enable-sockets \ + --enable-trace-log \ %if %{with_hiredis} --enable-async-redis \ %endif --enable-openssl \ %if %{with_nghttpd2} --enable-http2 \ +%endif +%if %{with_pgsql} + --enable-coroutine-postgresql \ %endif --enable-thread \ --enable-mysqlnd \ @@ -301,6 +316,13 @@ cd ../ZTS %changelog +* Tue Apr 10 2018 Remi Collet - 2.1.2-1 +- update to 2.1.2 +- add PostgreSQL coroutine client on Fedora 24+ +- enable trace log +- open https://github.com/swoole/swoole-src/issues/1558 + broken build with PHP 7.0 + * Wed Mar 7 2018 Remi Collet - 2.1.1-1 - update to 2.1.1 -- cgit