From 3c23f3d805486704c3af0e5d4db9b07edbea4c74 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 27 Jan 2016 10:21:07 +0100 Subject: php-pecl-swoole: 1.8.0 --- REFLECTION | 554 ++++++++++++++++++++++++--------------------------- php-pecl-swoole.spec | 16 +- swoole-pr462.patch | 25 --- 3 files changed, 268 insertions(+), 327 deletions(-) delete mode 100644 swoole-pr462.patch diff --git a/REFLECTION b/REFLECTION index 8340c23..74aa820 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #166 swoole version 1.7.22 ] { +Extension [ extension #167 swoole version 1.8.0 ] { - INI { Entry [ swoole.aio_thread_num ] @@ -42,7 +42,7 @@ Extension [ extension #166 swoole version 1.7.22 ] { Constant [ integer SWOOLE_KEEP ] { 4096 } Constant [ integer SWOOLE_EVENT_READ ] { 512 } Constant [ integer SWOOLE_EVENT_WRITE ] { 1024 } - Constant [ string SWOOLE_VERSION ] { 1.7.22 } + Constant [ string SWOOLE_VERSION ] { 1.8.0 } Constant [ integer SWOOLE_AIO_BASE ] { 0 } Constant [ integer SWOOLE_AIO_GCC ] { 1 } Constant [ integer SWOOLE_AIO_LINUX ] { 2 } @@ -68,217 +68,141 @@ Extension [ extension #166 swoole version 1.7.22 ] { } Function [ function swoole_cpu_num ] { } - Function [ function swoole_server_create ] { - - - Parameters [4] { - Parameter #0 [ $serv_host ] - Parameter #1 [ $serv_port ] - Parameter #2 [ $serv_mode ] - Parameter #3 [ $sock_type ] - } - } - Function [ function swoole_server_set ] { + Function [ function swoole_event_add ] { - Parameters [2] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $zset ] + Parameter #0 [ $fd ] + Parameter #1 [ $cb ] } } - Function [ function swoole_server_start ] { + Function [ function swoole_event_set ] { + } + Function [ function swoole_event_del ] { - Parameters [1] { - Parameter #0 [ swoole_server $zobject ] + Parameter #0 [ $fd ] } } - Function [ function swoole_server_send ] { + Function [ function swoole_event_exit ] { - - Parameters [4] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $conn_fd ] - Parameter #2 [ $send_data ] - Parameter #3 [ $from_id ] + - Parameters [0] { } } - Function [ function swoole_server_sendfile ] { + Function [ function swoole_event_wait ] { - - Parameters [3] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $conn_fd ] - Parameter #2 [ $filename ] + - Parameters [0] { } } - Function [ function swoole_server_close ] { + Function [ function swoole_event_write ] { - Parameters [2] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $fd ] + Parameter #0 [ $fd ] + Parameter #1 [ $data ] } } - Function [ function swoole_server_handler ] { + Function [ function swoole_event_defer ] { - - Parameters [3] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $ha_name ] - Parameter #2 [ $cb ] + - Parameters [1] { + Parameter #0 [ $callback ] } } - Function [ function swoole_server_on ] { + Function [ function swoole_timer_after ] { - Parameters [3] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $ha_name ] - Parameter #2 [ $cb ] + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] + Parameter #2 [ $param ] } } - Function [ function swoole_server_addlisten ] { - - - Parameters [4] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $host ] - Parameter #2 [ $port ] - Parameter #3 [ $sock_type ] - } - } - Function [ function swoole_server_addtimer ] { + Function [ function swoole_timer_tick ] { - Parameters [2] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $interval ] - } - } - Function [ function swoole_server_gettimer ] { - } - Function [ function swoole_server_task ] { - - - Parameters [3] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $data ] - Parameter #2 [ $worker_id ] - } - } - Function [ function swoole_server_taskwait ] { - - - Parameters [4] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $data ] - Parameter #2 [ $timeout ] - Parameter #3 [ $worker_id ] + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] } } - Function [ function swoole_server_finish ] { + Function [ function swoole_timer_clear ] { - - Parameters [2] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $data ] + - Parameters [1] { + Parameter #0 [ $timer_id ] } } - Function [ function swoole_server_reload ] { + Function [ function swoole_async_set ] { - Parameters [1] { - Parameter #0 [ swoole_server $zobject ] + Parameter #0 [ $settings ] } } - Function [ function swoole_server_shutdown ] { + Function [ function swoole_async_read ] { - - Parameters [1] { - Parameter #0 [ swoole_server $zobject ] + - Parameters [4] { + Parameter #0 [ $filename ] + Parameter #1 [ $callback ] + Parameter #2 [ $chunk_size ] + Parameter #3 [ $offset ] } } - Function [ function swoole_server_heartbeat ] { + Function [ function swoole_async_write ] { - - Parameters [2] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $from_id ] + - Parameters [4] { + Parameter #0 [ $filename ] + Parameter #1 [ $content ] + Parameter #2 [ $offset ] + Parameter #3 [ $callback ] } } - Function [ function swoole_connection_info ] { + Function [ function swoole_async_readfile ] { - - Parameters [3] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $fd ] - Parameter #2 [ $from_id ] + - Parameters [2] { + Parameter #0 [ $filename ] + Parameter #1 [ $callback ] } } - Function [ function swoole_connection_list ] { + Function [ function swoole_async_writefile ] { - Parameters [3] { - Parameter #0 [ swoole_server $zobject ] - Parameter #1 [ $start_fd ] - Parameter #2 [ $find_count ] + Parameter #0 [ $filename ] + Parameter #1 [ $content ] + Parameter #2 [ $callback ] } } - Function [ function swoole_event_add ] { + Function [ function swoole_async_dns_lookup ] { - Parameters [2] { - Parameter #0 [ $fd ] - Parameter #1 [ $cb ] + Parameter #0 [ $domain_name ] + Parameter #1 [ $content ] } } - Function [ function swoole_event_set ] { - } - Function [ function swoole_event_del ] { + Function [ function swoole_client_select ] { - - Parameters [1] { - Parameter #0 [ $fd ] + - Parameters [4] { + Parameter #0 [ $read_array ] + Parameter #1 [ $write_array ] + Parameter #2 [ $error_array ] + Parameter #3 [ $timeout ] } } - Function [ function swoole_event_exit ] { + Function [ function swoole_set_process_name ] { - - Parameters [0] { + - Parameters [1] { + Parameter #0 [ $process_name ] } } - Function [ function swoole_event_wait ] { + Function [ function swoole_get_local_ip ] { - Parameters [0] { } } - Function [ function swoole_event_write ] { - - - Parameters [2] { - Parameter #0 [ $fd ] - Parameter #1 [ $data ] - } - } - Function [ function swoole_timer_add ] { - - - Parameters [2] { - Parameter #0 [ $interval ] - Parameter #1 [ $cb ] - } - } - Function [ function swoole_timer_del ] { + Function [ function swoole_strerror ] { - Parameters [1] { - Parameter #0 [ $interval ] + Parameter #0 [ $errno ] } } - Function [ function swoole_timer_after ] { - } - Function [ function swoole_timer_tick ] { - } - Function [ function swoole_timer_clear ] { - } - Function [ function swoole_async_set ] { - } - Function [ function swoole_async_read ] { - } - Function [ function swoole_async_write ] { - } - Function [ function swoole_async_readfile ] { - } - Function [ function swoole_async_writefile ] { - } - Function [ function swoole_async_dns_lookup ] { - } - Function [ function swoole_client_select ] { - } - Function [ function swoole_set_process_name ] { - } - Function [ function swoole_get_local_ip ] { - } - Function [ function swoole_strerror ] { - } Function [ function swoole_errno ] { + + - Parameters [0] { + } } Function [ function swoole_mysql_query ] { @@ -296,7 +220,7 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - - Classes [13] { + - Classes [14] { Class [ class swoole_server ] { - Constants [0] { @@ -311,7 +235,7 @@ Extension [ extension #166 swoole version 1.7.22 ] { - Properties [0] { } - - Methods [35] { + - Methods [32] { Method [ public method __construct ] { - Parameters [4] { @@ -322,6 +246,32 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } + Method [ public method listen ] { + + - Parameters [3] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + Parameter #2 [ $sock_type ] + } + } + + Method [ public method addlistener ] { + + - Parameters [3] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + Parameter #2 [ $sock_type ] + } + } + + Method [ public method on ] { + + - Parameters [2] { + Parameter #0 [ $name ] + Parameter #1 [ $cb ] + } + } + Method [ public method set ] { - Parameters [1] { @@ -368,6 +318,14 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } + Method [ public method protect ] { + + - Parameters [2] { + Parameter #0 [ $conn_fd ] + Parameter #1 [ $is_protected ] + } + } + Method [ public method sendfile ] { - Parameters [2] { @@ -407,24 +365,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method addlistener ] { - - - Parameters [3] { - Parameter #0 [ $host ] - Parameter #1 [ $port ] - Parameter #2 [ $sock_type ] - } - } - - Method [ public method listen ] { - - - Parameters [3] { - Parameter #0 [ $host ] - Parameter #1 [ $port ] - Parameter #2 [ $sock_type ] - } - } - Method [ public method reload ] { - Parameters [0] { @@ -437,13 +377,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method hbcheck ] { - - - Parameters [1] { - Parameter #0 [ $from_id ] - } - } - Method [ public method heartbeat ] { - Parameters [1] { @@ -451,22 +384,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method handler ] { - - - Parameters [2] { - Parameter #0 [ $ha_name ] - Parameter #1 [ $cb ] - } - } - - Method [ public method on ] { - - - Parameters [2] { - Parameter #0 [ $ha_name ] - Parameter #1 [ $cb ] - } - } - Method [ public method connection_info ] { - Parameters [2] { @@ -499,30 +416,35 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method addtimer ] { + Method [ public method after ] { - - Parameters [1] { - Parameter #0 [ $interval ] + - Parameters [3] { + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] + Parameter #2 [ $param ] } } - Method [ public method deltimer ] { + Method [ public method tick ] { - - Parameters [1] { - Parameter #0 [ $interval ] + - Parameters [2] { + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] } } - Method [ public method gettimer ] { - } + Method [ public method clearTimer ] { - Method [ public method after ] { + - Parameters [1] { + Parameter #0 [ $timer_id ] + } } - Method [ public method tick ] { - } + Method [ public method defer ] { - Method [ public method clearTimer ] { + - Parameters [1] { + Parameter #0 [ $callback ] + } } Method [ public method sendmessage ] { @@ -600,6 +522,32 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } + Class [ class swoole_server_port ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [3] { + Method [ public method __destruct ] { + } + + Method [ public method set ] { + } + + Method [ public method on ] { + } + } + } + Class [ class swoole_client ] { - Constants [4] { @@ -615,9 +563,10 @@ Extension [ extension #166 swoole version 1.7.22 ] { - Static methods [0] { } - - Properties [2] { + - Properties [3] { Property [ public $errCode ] Property [ public $sock ] + Property [ public $reuse ] } - Methods [16] { @@ -699,7 +648,7 @@ Extension [ extension #166 swoole version 1.7.22 ] { - Properties [0] { } - - Methods [12] { + - Methods [13] { Method [ public method __construct ] { } @@ -709,6 +658,9 @@ Extension [ extension #166 swoole version 1.7.22 ] { Method [ public method useQueue ] { } + Method [ public method freeQueue ] { + } + Method [ public method start ] { } @@ -969,7 +921,7 @@ Extension [ extension #166 swoole version 1.7.22 ] { Property [ private $global ] } - - Methods [36] { + - Methods [33] { Method [ public method on ] { - Parameters [2] { @@ -994,6 +946,24 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } + Method [ public method listen ] { + + - Parameters [3] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + Parameter #2 [ $sock_type ] + } + } + + Method [ public method addlistener ] { + + - Parameters [3] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + Parameter #2 [ $sock_type ] + } + } + Method [ public method set ] { - Parameters [1] { @@ -1034,6 +1004,14 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } + Method [ public method protect ] { + + - Parameters [2] { + Parameter #0 [ $conn_fd ] + Parameter #1 [ $is_protected ] + } + } + Method [ public method sendfile ] { - Parameters [2] { @@ -1073,24 +1051,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method addlistener ] { - - - Parameters [3] { - Parameter #0 [ $host ] - Parameter #1 [ $port ] - Parameter #2 [ $sock_type ] - } - } - - Method [ public method listen ] { - - - Parameters [3] { - Parameter #0 [ $host ] - Parameter #1 [ $port ] - Parameter #2 [ $sock_type ] - } - } - Method [ public method reload ] { - Parameters [0] { @@ -1103,13 +1063,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method hbcheck ] { - - - Parameters [1] { - Parameter #0 [ $from_id ] - } - } - Method [ public method heartbeat ] { - Parameters [1] { @@ -1117,14 +1070,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method handler ] { - - - Parameters [2] { - Parameter #0 [ $ha_name ] - Parameter #1 [ $cb ] - } - } - Method [ public method connection_info ] { - Parameters [2] { @@ -1157,30 +1102,35 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method addtimer ] { + Method [ public method after ] { - - Parameters [1] { - Parameter #0 [ $interval ] + - Parameters [3] { + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] + Parameter #2 [ $param ] } } - Method [ public method deltimer ] { + Method [ public method tick ] { - - Parameters [1] { - Parameter #0 [ $interval ] + - Parameters [2] { + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] } } - Method [ public method gettimer ] { - } + Method [ public method clearTimer ] { - Method [ public method after ] { + - Parameters [1] { + Parameter #0 [ $timer_id ] + } } - Method [ public method tick ] { - } + Method [ public method defer ] { - Method [ public method clearTimer ] { + - Parameters [1] { + Parameter #0 [ $callback ] + } } Method [ public method sendmessage ] { @@ -1315,13 +1265,29 @@ Extension [ extension #166 swoole version 1.7.22 ] { - Static properties [0] { } - - Static methods [0] { + - Static methods [2] { + Method [ static public method pack ] { + + - Parameters [4] { + Parameter #0 [ $data ] + Parameter #1 [ $opcode ] + Parameter #2 [ $finish ] + Parameter #3 [ $mask ] + } + } + + Method [ static public method unpack ] { + + - Parameters [1] { + Parameter #0 [ $data ] + } + } } - Properties [0] { } - - Methods [37] { + - Methods [34] { Method [ public method on ] { - Parameters [2] { @@ -1363,6 +1329,24 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } + Method [ public method listen ] { + + - Parameters [3] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + Parameter #2 [ $sock_type ] + } + } + + Method [ public method addlistener ] { + + - Parameters [3] { + Parameter #0 [ $host ] + Parameter #1 [ $port ] + Parameter #2 [ $sock_type ] + } + } + Method [ public method set ] { - Parameters [1] { @@ -1396,6 +1380,14 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } + Method [ public method protect ] { + + - Parameters [2] { + Parameter #0 [ $conn_fd ] + Parameter #1 [ $is_protected ] + } + } + Method [ public method sendfile ] { - Parameters [2] { @@ -1435,24 +1427,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method addlistener ] { - - - Parameters [3] { - Parameter #0 [ $host ] - Parameter #1 [ $port ] - Parameter #2 [ $sock_type ] - } - } - - Method [ public method listen ] { - - - Parameters [3] { - Parameter #0 [ $host ] - Parameter #1 [ $port ] - Parameter #2 [ $sock_type ] - } - } - Method [ public method reload ] { - Parameters [0] { @@ -1465,13 +1439,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method hbcheck ] { - - - Parameters [1] { - Parameter #0 [ $from_id ] - } - } - Method [ public method heartbeat ] { - Parameters [1] { @@ -1479,14 +1446,6 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method handler ] { - - - Parameters [2] { - Parameter #0 [ $ha_name ] - Parameter #1 [ $cb ] - } - } - Method [ public method connection_info ] { - Parameters [2] { @@ -1519,30 +1478,35 @@ Extension [ extension #166 swoole version 1.7.22 ] { } } - Method [ public method addtimer ] { + Method [ public method after ] { - - Parameters [1] { - Parameter #0 [ $interval ] + - Parameters [3] { + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] + Parameter #2 [ $param ] } } - Method [ public method deltimer ] { + Method [ public method tick ] { - - Parameters [1] { - Parameter #0 [ $interval ] + - Parameters [2] { + Parameter #0 [ $ms ] + Parameter #1 [ $callback ] } } - Method [ public method gettimer ] { - } + Method [ public method clearTimer ] { - Method [ public method after ] { + - Parameters [1] { + Parameter #0 [ $timer_id ] + } } - Method [ public method tick ] { - } + Method [ public method defer ] { - Method [ public method clearTimer ] { + - Parameters [1] { + Parameter #0 [ $callback ] + } } Method [ public method sendmessage ] { diff --git a/php-pecl-swoole.spec b/php-pecl-swoole.spec index 02cc8b7..af942ca 100644 --- a/php-pecl-swoole.spec +++ b/php-pecl-swoole.spec @@ -31,16 +31,13 @@ Summary: PHP's asynchronous concurrent distributed networking framework Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.7.22 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 1.8.0 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# see https://github.com/swoole/swoole-src/pull/462 -Patch0: %{pecl_name}-pr462.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel >= 5.3.10 BuildRequires: %{?scl_prefix}php-pear @@ -63,6 +60,8 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff @@ -115,11 +114,11 @@ mv %{pecl_name}-%{version} NTS # Don't install/register tests, install examples as doc sed -e 's/role="test"/role="src"/' \ -e '/examples/s/role="src"/role="doc"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml cd NTS -%patch0 -p1 -b .pr462 # Sanity check, really often broken extver=$(sed -n '/#define PHP_SWOOLE_VERSION/{s/.* "//;s/".*$//;p}' php_swoole.h) @@ -141,7 +140,7 @@ extension=%{pecl_name}.so ; Configuration ;swoole.aio_thread_num = 2 -;swoole.display_errors = 2 +;swoole.display_errors = On ;swoole.message_queue_key = 0 ;swoole.unixsock_buffer_size = 8388608 EOF @@ -257,6 +256,9 @@ rm -rf %{buildroot} %changelog +* Wed Jan 27 2016 Remi Collet - 1.8.0-1 +- Update to 1.8.0 (stable) + * Thu Dec 31 2015 Remi Collet - 1.7.22-2 - Update to 1.7.22 (new sources) diff --git a/swoole-pr462.patch b/swoole-pr462.patch deleted file mode 100644 index b6b52f9..0000000 --- a/swoole-pr462.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2a506ab42328dc8d9d1ad7ecb9cec23f1c04e2a2 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 31 Dec 2015 09:11:21 +0100 -Subject: [PATCH] Use concat_function with PHP 7, fix #461 - ---- - swoole_http_client.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/swoole_http_client.c b/swoole_http_client.c -index 8197d56..a6b358f 100644 ---- a/swoole_http_client.c -+++ b/swoole_http_client.c -@@ -1024,7 +1024,11 @@ static int http_client_parser_on_body(php_http_parser *parser, const char *at, s - zval *tmp; - SW_MAKE_STD_ZVAL(tmp); - SW_ZVAL_STRINGL(tmp, at, length, 1); -+#if PHP_MAJOR_VERSION < 7 - add_string_to_string(body, body, tmp); -+#else -+ concat_function(body, body, tmp); -+#endif - sw_zval_ptr_dtor(&tmp); - - return 0; -- cgit