From ee326f50e91945130c5a94331440d3f60149000d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 31 Dec 2015 09:45:06 +0100 Subject: php-pecl-swoole: 1.7.22 --- REFLECTION | 89 ++++++++++++++++++++++++++++++++++++++++++++-------- php-pecl-swoole.spec | 12 ++++++- swoole-pr462.patch | 25 +++++++++++++++ 3 files changed, 112 insertions(+), 14 deletions(-) create mode 100644 swoole-pr462.patch diff --git a/REFLECTION b/REFLECTION index 38f10f4..1f05c61 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #160 swoole version 1.7.21 ] { +Extension [ extension #166 swoole version 1.7.22 ] { - INI { Entry [ swoole.aio_thread_num ] @@ -15,7 +15,7 @@ Extension [ extension #160 swoole version 1.7.21 ] { } } - - Constants [44] { + - Constants [45] { Constant [ integer SWOOLE_BASE ] { 4 } Constant [ integer SWOOLE_THREAD ] { 2 } Constant [ integer SWOOLE_PROCESS ] { 3 } @@ -42,7 +42,7 @@ Extension [ extension #160 swoole version 1.7.21 ] { Constant [ integer SWOOLE_KEEP ] { 4096 } Constant [ integer SWOOLE_EVENT_READ ] { 512 } Constant [ integer SWOOLE_EVENT_WRITE ] { 1024 } - Constant [ string SWOOLE_VERSION ] { 1.7.21 } + Constant [ string SWOOLE_VERSION ] { 1.7.22 } Constant [ integer SWOOLE_AIO_BASE ] { 0 } Constant [ integer SWOOLE_AIO_GCC ] { 1 } Constant [ integer SWOOLE_AIO_LINUX ] { 2 } @@ -60,6 +60,7 @@ Extension [ extension #160 swoole version 1.7.21 ] { Constant [ integer WEBSOCKET_STATUS_CONNECTION ] { 1 } Constant [ integer WEBSOCKET_STATUS_HANDSHAKE ] { 2 } Constant [ integer WEBSOCKET_STATUS_FRAME ] { 3 } + Constant [ integer WEBSOCKET_STATUS_ACTIVE ] { 3 } } - Functions { @@ -279,11 +280,23 @@ Extension [ extension #160 swoole version 1.7.21 ] { } Function [ function swoole_errno ] { } + Function [ function swoole_mysql_query ] { + + - Parameters [3] { + Parameter #0 [ $db_link ] + Parameter #1 [ $sql ] + Parameter #2 [ $callback ] + } + } Function [ function swoole_get_mysqli_sock ] { + + - Parameters [1] { + Parameter #0 [ $db_link ] + } } } - - Classes [13] { + - Classes [14] { Class [ class swoole_server ] { - Constants [0] { @@ -589,7 +602,11 @@ Extension [ extension #160 swoole version 1.7.21 ] { Class [ class swoole_client ] { - - Constants [0] { + - Constants [4] { + Constant [ integer MSG_OOB ] { 1 } + Constant [ integer MSG_PEEK ] { 2 } + Constant [ integer MSG_DONTWAIT ] { 64 } + Constant [ integer MSG_WAITALL ] { 256 } } - Static properties [0] { @@ -654,6 +671,46 @@ Extension [ extension #160 swoole version 1.7.21 ] { } } + Class [ class swoole_http_client ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [2] { + Property [ public $errCode ] + Property [ public $sock ] + } + + - Methods [7] { + Method [ public method __construct ] { + } + + Method [ public method __destruct ] { + } + + Method [ public method set ] { + } + + Method [ public method execute ] { + } + + Method [ public method isConnected ] { + } + + Method [ public method close ] { + } + + Method [ public method on ] { + } + } + } + Class [ class swoole_process ] { - Constants [0] { @@ -738,7 +795,7 @@ Extension [ extension #160 swoole version 1.7.21 ] { - Properties [0] { } - - Methods [17] { + - Methods [18] { Method [ public method __construct ] { - Parameters [1] { @@ -761,6 +818,12 @@ Extension [ extension #160 swoole version 1.7.21 ] { } } + Method [ public method destroy ] { + + - Parameters [0] { + } + } + Method [ public method set ] { - Parameters [2] { @@ -1317,6 +1380,13 @@ Extension [ extension #160 swoole version 1.7.21 ] { } } + Method [ public method exist ] { + + - Parameters [1] { + Parameter #0 [ $fd ] + } + } + Method [ public method setglobal ] { } @@ -1366,13 +1436,6 @@ Extension [ extension #160 swoole version 1.7.21 ] { } } - Method [ public method exist ] { - - - Parameters [1] { - Parameter #0 [ $conn_fd ] - } - } - Method [ public method sendfile ] { - Parameters [2] { diff --git a/php-pecl-swoole.spec b/php-pecl-swoole.spec index c6bf5c2..9ccf08a 100644 --- a/php-pecl-swoole.spec +++ b/php-pecl-swoole.spec @@ -31,13 +31,16 @@ Summary: PHP's asynchronous concurrent distributed networking framework Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.7.21 +Version: 1.7.22 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 @@ -116,6 +119,7 @@ sed -e 's/role="test"/role="src"/' \ cd NTS +%patch0 -p1 -b .pr462 # Sanity check, really often broken extver=$(sed -n '/#define PHP_SWOOLE_VERSION/{s/.* "//;s/".*$//;p}' php_swoole.h) @@ -253,6 +257,12 @@ rm -rf %{buildroot} %changelog +* Thu Dec 31 2015 Remi Collet - 1.7.22-1 +- Update to 1.7.22 +- add patch to fix PHP 7 build + open https://github.com/swoole/swoole-src/pull/462 + open https://github.com/swoole/swoole-src/issues/461 + * Tue Dec 01 2015 Remi Collet - 1.7.21-1 - Update to 1.7.21 diff --git a/swoole-pr462.patch b/swoole-pr462.patch new file mode 100644 index 0000000..b6b52f9 --- /dev/null +++ b/swoole-pr462.patch @@ -0,0 +1,25 @@ +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