summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-12-20 08:57:31 +0100
committerRemi Collet <remi@php.net>2021-12-20 08:57:31 +0100
commit1fd143a60ceb86c9941a75ba2025cebf6fe9908b (patch)
tree4b92d63a27b42730e4b560ec0669e387da98b569
parent872986b6d6a4e607bfa2bea763450bbab28de07b (diff)
update to 4.9.0
add patch for libcurl < 7.56 (EL-7) from https://github.com/openswoole/swoole-src/pull/103
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION101
-rw-r--r--openswoole-oldcurl.patch59
-rw-r--r--openswoole-pg9.patch36
-rw-r--r--php-pecl-openswoole.spec23
5 files changed, 120 insertions, 103 deletions
diff --git a/PHPINFO b/PHPINFO
index f10b133..d105243 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,8 +3,8 @@ openswoole
Open Swoole => enabled
Author => Open Swoole Group & Contributors <hello@swoole.co.uk>
-Version => 4.8.1
-Built => Nov 29 2021 00:00:00
+Version => 4.9.0
+Built => Dec 20 2021 00:00:00
coroutine => enabled with boost asm context
trace_log => enabled
epoll => enabled
diff --git a/REFLECTION b/REFLECTION
index 239296c..610de62 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
+Extension [ <persistent> extension #88 openswoole version 4.9.0 ] {
- Dependencies {
Dependency [ swoole (Conflicts) ]
@@ -29,12 +29,12 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- - Constants [378] {
- Constant [ string SWOOLE_VERSION ] { 4.8.1 }
- Constant [ int SWOOLE_VERSION_ID ] { 40801 }
+ - Constants [381] {
+ Constant [ string SWOOLE_VERSION ] { 4.9.0 }
+ Constant [ int SWOOLE_VERSION_ID ] { 40900 }
Constant [ int SWOOLE_MAJOR_VERSION ] { 4 }
- Constant [ int SWOOLE_MINOR_VERSION ] { 8 }
- Constant [ int SWOOLE_RELEASE_VERSION ] { 1 }
+ Constant [ int SWOOLE_MINOR_VERSION ] { 9 }
+ Constant [ int SWOOLE_RELEASE_VERSION ] { 0 }
Constant [ string SWOOLE_EXTRA_VERSION ] { }
Constant [ bool SWOOLE_DEBUG ] { }
Constant [ bool SWOOLE_HAVE_COMPRESSION ] { 1 }
@@ -244,6 +244,9 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Constant [ int SWOOLE_IPC_NONE ] { 0 }
Constant [ int SWOOLE_IPC_UNIXSOCK ] { 1 }
Constant [ int SWOOLE_IPC_SOCKET ] { 3 }
+ Constant [ int OPENSWOOLE_STATS_DEFAULT ] { 0 }
+ Constant [ int OPENSWOOLE_STATS_JSON ] { 1 }
+ Constant [ int OPENSWOOLE_STATS_OPENMETRICS ] { 2 }
Constant [ int SWOOLE_IOV_MAX ] { 1024 }
Constant [ int SWOOLE_FILELOCK ] { 2 }
Constant [ int SWOOLE_MUTEX ] { 3 }
@@ -854,7 +857,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Function [ <internal:openswoole> function swoole_native_curl_multi_add_handle ] {
- Parameters [2] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
Parameter #1 [ <required> CurlHandle $handle ]
}
- Return [ int ]
@@ -862,21 +865,21 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Function [ <internal:openswoole> function swoole_native_curl_multi_close ] {
- Parameters [1] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
}
- Return [ void ]
}
Function [ <internal:openswoole> function swoole_native_curl_multi_errno ] {
- Parameters [1] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
}
- Return [ int ]
}
Function [ <internal:openswoole> function swoole_native_curl_multi_exec ] {
- Parameters [2] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
Parameter #1 [ <required> &$still_running ]
}
- Return [ int ]
@@ -884,7 +887,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Function [ <internal:openswoole> function swoole_native_curl_multi_select ] {
- Parameters [2] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
Parameter #1 [ <optional> float $timeout = 1.0 ]
}
- Return [ int ]
@@ -892,7 +895,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Function [ <internal:openswoole> function swoole_native_curl_multi_setopt ] {
- Parameters [3] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
Parameter #1 [ <required> int $option ]
Parameter #2 [ <required> mixed $value ]
}
@@ -908,7 +911,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Function [ <internal:openswoole> function swoole_native_curl_multi_info_read ] {
- Parameters [2] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
Parameter #1 [ <optional> &$queued_messages = null ]
}
- Return [ array|false ]
@@ -917,20 +920,20 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
- Parameters [0] {
}
- - Return [ Swoole\Coroutine\Curl\MultiHandle ]
+ - Return [ CurlMultiHandle ]
}
Function [ <internal:openswoole> function swoole_native_curl_multi_remove_handle ] {
- Parameters [2] {
- Parameter #0 [ <required> Swoole\Coroutine\Curl\MultiHandle $multi_handle ]
+ Parameter #0 [ <required> CurlMultiHandle $multi_handle ]
Parameter #1 [ <required> CurlHandle $handle ]
}
- Return [ int ]
}
}
- - Classes [54] {
- Class [ <internal:openswoole> class Swoole\Exception extends Exception implements Stringable, Throwable ] {
+ - Classes [53] {
+ Class [ <internal:openswoole> class Swoole\Exception extends Exception implements Throwable, Stringable ] {
- Constants [0] {
}
@@ -1021,7 +1024,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\Error extends Error implements Stringable, Throwable ] {
+ Class [ <internal:openswoole> class Swoole\Error extends Error implements Throwable, Stringable ] {
- Constants [0] {
}
@@ -1470,7 +1473,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Method [ <internal:openswoole> static public method wait ] {
- Parameters [1] {
- Parameter #0 [ <optional> bool $blocking = 1 ]
+ Parameter #0 [ <optional> bool $blocking = true ]
}
- Return [ array|bool ]
}
@@ -2981,7 +2984,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\ExitException extends Swoole\Exception implements Throwable, Stringable ] {
+ Class [ <internal:openswoole> class Swoole\ExitException extends Swoole\Exception implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -3419,25 +3422,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> final class Swoole\Coroutine\Curl\MultiHandle ] {
-
- - Constants [0] {
- }
-
- - Static properties [0] {
- }
-
- - Static methods [0] {
- }
-
- - Properties [0] {
- }
-
- - Methods [0] {
- }
- }
-
- Class [ <internal:openswoole> class Swoole\Coroutine\Curl\Exception extends Swoole\Exception implements Throwable, Stringable ] {
+ Class [ <internal:openswoole> class Swoole\Coroutine\Curl\Exception extends Swoole\Exception implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -3808,7 +3793,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\Coroutine\Socket\Exception extends Swoole\Exception implements Throwable, Stringable ] {
+ Class [ <internal:openswoole> class Swoole\Coroutine\Socket\Exception extends Swoole\Exception implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -4067,7 +4052,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\Client\Exception extends Swoole\Exception implements Throwable, Stringable ] {
+ Class [ <internal:openswoole> class Swoole\Client\Exception extends Swoole\Exception implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -4566,7 +4551,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\Coroutine\Http\Client\Exception extends Swoole\Exception implements Throwable, Stringable ] {
+ Class [ <internal:openswoole> class Swoole\Coroutine\Http\Client\Exception extends Swoole\Exception implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -4854,7 +4839,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\Coroutine\MySQL\Exception extends Swoole\Exception implements Throwable, Stringable ] {
+ Class [ <internal:openswoole> class Swoole\Coroutine\MySQL\Exception extends Swoole\Exception implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -6574,7 +6559,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\Coroutine\Http2\Client\Exception extends Swoole\Exception implements Throwable, Stringable ] {
+ Class [ <internal:openswoole> class Swoole\Coroutine\Http2\Client\Exception extends Swoole\Exception implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -7101,9 +7086,10 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Method [ <internal:openswoole> public method stats ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> int $mode = 0 ]
}
- - Return [ array|false ]
+ - Return [ array|string|false ]
}
Method [ <internal:openswoole> public method getSocket ] {
@@ -8168,9 +8154,10 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Method [ <internal:openswoole, inherits Swoole\Server> public method stats ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> int $mode = 0 ]
}
- - Return [ array|false ]
+ - Return [ array|string|false ]
}
Method [ <internal:openswoole, inherits Swoole\Server> public method getSocket ] {
@@ -8717,9 +8704,10 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Method [ <internal:openswoole, inherits Swoole\Server> public method stats ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> int $mode = 0 ]
}
- - Return [ array|false ]
+ - Return [ array|string|false ]
}
Method [ <internal:openswoole, inherits Swoole\Server> public method getSocket ] {
@@ -8774,7 +8762,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\WebSocket\Frame ] {
+ Class [ <internal:openswoole> class Swoole\WebSocket\Frame implements Stringable ] {
- Constants [0] {
}
@@ -8811,7 +8799,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
- Methods [1] {
- Method [ <internal:openswoole> public method __toString ] {
+ Method [ <internal:openswoole, prototype Stringable> public method __toString ] {
- Parameters [0] {
}
@@ -8820,7 +8808,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
}
- Class [ <internal:openswoole> class Swoole\WebSocket\CloseFrame extends Swoole\WebSocket\Frame ] {
+ Class [ <internal:openswoole> class Swoole\WebSocket\CloseFrame extends Swoole\WebSocket\Frame implements Stringable ] {
- Constants [0] {
}
@@ -8859,7 +8847,7 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
}
- Methods [1] {
- Method [ <internal:openswoole, inherits Swoole\WebSocket\Frame> public method __toString ] {
+ Method [ <internal:openswoole, inherits Swoole\WebSocket\Frame, prototype Stringable> public method __toString ] {
- Parameters [0] {
}
@@ -9273,9 +9261,10 @@ Extension [ <persistent> extension #88 openswoole version 4.8.1 ] {
Method [ <internal:openswoole, inherits Swoole\Server> public method stats ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> int $mode = 0 ]
}
- - Return [ array|false ]
+ - Return [ array|string|false ]
}
Method [ <internal:openswoole, inherits Swoole\Server> public method getSocket ] {
diff --git a/openswoole-oldcurl.patch b/openswoole-oldcurl.patch
new file mode 100644
index 0000000..ef592c0
--- /dev/null
+++ b/openswoole-oldcurl.patch
@@ -0,0 +1,59 @@
+From b0afb66e8d74eeadf0bff02098a1fe154087377c Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 20 Dec 2021 08:38:43 +0100
+Subject: [PATCH] fix build with old libcurl
+
+---
+ thirdparty/php/curl/interface.cc | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/thirdparty/php/curl/interface.cc b/thirdparty/php/curl/interface.cc
+index 6af19e0dc..c1d7f748e 100644
+--- a/thirdparty/php/curl/interface.cc
++++ b/thirdparty/php/curl/interface.cc
+@@ -381,7 +381,9 @@ static zend_function *swoole_curl_get_constructor(zend_object *object) {
+ static zend_object *swoole_curl_clone_obj(zend_object *object) {
+ php_curl *ch;
+ CURL *cp;
++#if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 */
+ zval *postfields;
++#endif
+ zend_object *clone_object;
+ php_curl *clone_ch;
+
+@@ -399,6 +401,7 @@ static zend_object *swoole_curl_clone_obj(zend_object *object) {
+ clone_ch->cp = cp;
+ swoole_setup_easy_copy_handlers(clone_ch, ch);
+
++#if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 */
+ postfields = &clone_ch->postfields;
+ if (Z_TYPE_P(postfields) != IS_UNDEF) {
+ if (build_mime_structure_from_hash(clone_ch, postfields) != SUCCESS) {
+@@ -406,6 +409,7 @@ static zend_object *swoole_curl_clone_obj(zend_object *object) {
+ return &clone_ch->std;
+ }
+ }
++#endif
+
+ return &clone_ch->std;
+ }
+@@ -415,7 +419,9 @@ static HashTable *swoole_curl_get_gc(zend_object *object, zval **table, int *n)
+
+ zend_get_gc_buffer *gc_buffer = zend_get_gc_buffer_create();
+
++#if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 */
+ zend_get_gc_buffer_add_zval(gc_buffer, &curl->postfields);
++#endif
+ if (curl_handlers(curl)) {
+ if (curl_handlers(curl)->read) {
+ zend_get_gc_buffer_add_zval(gc_buffer, &curl_handlers(curl)->read->func_name);
+@@ -2835,7 +2841,9 @@ static void _php_curl_free(php_curl *ch) {
+ efree(ch->handlers);
+ #endif
+
++#if LIBCURL_VERSION_NUM >= 0x073800 /* 7.56.0 */
+ zval_ptr_dtor(&ch->postfields);
++#endif
+
+ #if PHP_VERSION_ID >= 80100
+ zval_ptr_dtor(&ch->private_data);
diff --git a/openswoole-pg9.patch b/openswoole-pg9.patch
deleted file mode 100644
index e0e402b..0000000
--- a/openswoole-pg9.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 21d86e3d6d62b70ffc9ecc22e651f15162c462f3 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 29 Nov 2021 07:29:22 +0100
-Subject: [PATCH] fix build with postgresql 9
-
----
- ext-src/swoole_postgres_coro.cc | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/ext-src/swoole_postgres_coro.cc b/ext-src/swoole_postgres_coro.cc
-index 06362e6f0..11e467225 100644
---- a/ext-src/swoole_postgres_coro.cc
-+++ b/ext-src/swoole_postgres_coro.cc
-@@ -539,6 +539,22 @@ static int meta_data_result_parse(PGObject *object) {
- return SW_OK;
- }
-
-+#ifndef PG_DIAG_SCHEMA_NAME
-+# define PG_DIAG_SCHEMA_NAME 's'
-+#endif
-+#ifndef PG_DIAG_TABLE_NAME
-+# define PG_DIAG_TABLE_NAME 't'
-+#endif
-+#ifndef PG_DIAG_COLUMN_NAME
-+# define PG_DIAG_COLUMN_NAME 'c'
-+#endif
-+#ifndef PG_DIAG_DATATYPE_NAME
-+# define PG_DIAG_DATATYPE_NAME 'd'
-+#endif
-+#ifndef PG_DIAG_CONSTRAINT_NAME
-+# define PG_DIAG_CONSTRAINT_NAME 'n'
-+#endif
-+
- static void set_error_diag(const PGObject *object, const PGresult *pgsql_result) {
- const unsigned int error_codes[] = {PG_DIAG_SEVERITY,
- PG_DIAG_SQLSTATE,
diff --git a/php-pecl-openswoole.spec b/php-pecl-openswoole.spec
index 0ba2c64..d5af860 100644
--- a/php-pecl-openswoole.spec
+++ b/php-pecl-openswoole.spec
@@ -28,7 +28,7 @@
%endif
%bcond_without pgsql
-%global upstream_version 4.8.1
+%global upstream_version 4.9.0
#global upstream_prever RC2
@@ -42,6 +42,8 @@ License: ASL 2.0 and BSD
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Patch0: openswoole-oldcurl.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?dtsprefix}gcc-c++
@@ -82,10 +84,10 @@ 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}
-# Single version can be installed (same symbols)
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 4
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}2 < 4
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}4 < 5
+# Only one extension can be installed (same symbols)
+Conflicts: %{?scl_prefix}php-pecl-swoole
+Conflicts: %{?scl_prefix}php-pecl-swoole2
+Conflicts: %{?scl_prefix}php-pecl-swoole4
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
%if "%{php_version}" > "7.4"
@@ -129,10 +131,6 @@ Summary: %{name} developer files (header)
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{?scl_prefix}php-devel%{?_isa}
-# Single version can be installed (same ext name)
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}-devel < 4
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}2-devel < 4
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}4-devel < 5
%description devel
These are the files needed to compile programs using %{name}.
@@ -154,6 +152,8 @@ sed \
cd NTS
+%patch0 -p1
+
cp -p thirdparty/hiredis/COPYING hiredis-COPYING
cp -p thirdparty/nghttp2/COPYING nghttp2-COPYING
@@ -326,6 +326,11 @@ cd ../ZTS
%changelog
+* Mon Dec 20 2021 Remi Collet <remi@remirepo.net> - 4.9.0-1
+- update to 4.9.0
+- add patch for libcurl < 7.56 (EL-7) from
+ https://github.com/openswoole/swoole-src/pull/103
+
* Mon Nov 29 2021 Remi Collet <remi@remirepo.net> - 4.8.1-1
- update to 4.8.1
- drop patch merged upstream