summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-09-29 13:34:17 +0200
committerRemi Collet <remi@php.net>2023-09-29 13:34:17 +0200
commit5a30a40d1003dad3cc3c339ca68d9874ba292e46 (patch)
tree6670ed7829eaa3e32819461f7bb022363dd7bfd1
parent73d26169b1d3ee9843efe39db65c289c753bd022 (diff)
update to 5.1.0
add dependency on pdo extension new coroutine_odbc enabled new coroutine_sqlite enabled new coroutine_oracle disabled
-rw-r--r--PHPINFO14
-rw-r--r--REFLECTION58
-rw-r--r--php-pecl-swoole5.spec67
-rw-r--r--swoole-php83.patch27
-rw-r--r--swoole-syslib.patch35
5 files changed, 87 insertions, 114 deletions
diff --git a/PHPINFO b/PHPINFO
index d13958b..85d6636 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,8 +3,8 @@ swoole
Swoole => enabled
Author => Swoole Team <team@swoole.com>
-Version => 5.0.3
-Built => Apr 26 2023 00:00:00
+Version => 5.1.0
+Built => Sep 29 2023 00:00:00
coroutine => enabled with boost asm context
trace_log => enabled
epoll => enabled
@@ -14,13 +14,13 @@ cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
-openssl => OpenSSL 3.0.8 7 Feb 2023
+openssl => OpenSSL 3.0.9 30 May 2023
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
-c-ares => 1.19.0
+c-ares => 1.19.1
zlib => 1.2.12
brotli => E16777225/D16777225
mutex_timedlock => enabled
@@ -28,11 +28,15 @@ pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
async_redis => enabled
-coroutine_postgresql => enabled
+coroutine_pgsql => enabled
+coroutine_odbc => enabled
+coroutine_oracle => enabled
+coroutine_sqlite => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
+swoole.enable_fiber_mock => Off => Off
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
diff --git a/REFLECTION b/REFLECTION
index 50ec5f4..6891767 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,10 +1,11 @@
-Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
+Extension [ <persistent> extension #102 swoole version 5.1.0 ] {
- Dependencies {
Dependency [ json (Required) ]
Dependency [ mysqlnd (Required) ]
Dependency [ sockets (Required) ]
Dependency [ curl (Required) ]
+ Dependency [ pdo (Required) ]
}
- INI {
@@ -14,6 +15,9 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Entry [ swoole.enable_library <ALL> ]
Current = 'On'
}
+ Entry [ swoole.enable_fiber_mock <ALL> ]
+ Current = 'Off'
+ }
Entry [ swoole.enable_preemptive_scheduler <ALL> ]
Current = 'Off'
}
@@ -28,12 +32,12 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
}
}
- - Constants [406] {
- Constant [ string SWOOLE_VERSION ] { 5.0.3 }
- Constant [ int SWOOLE_VERSION_ID ] { 50003 }
+ - Constants [414] {
+ Constant [ string SWOOLE_VERSION ] { 5.1.0 }
+ Constant [ int SWOOLE_VERSION_ID ] { 50100 }
Constant [ int SWOOLE_MAJOR_VERSION ] { 5 }
- Constant [ int SWOOLE_MINOR_VERSION ] { 0 }
- Constant [ int SWOOLE_RELEASE_VERSION ] { 3 }
+ Constant [ int SWOOLE_MINOR_VERSION ] { 1 }
+ Constant [ int SWOOLE_RELEASE_VERSION ] { 0 }
Constant [ string SWOOLE_EXTRA_VERSION ] { }
Constant [ bool SWOOLE_DEBUG ] { }
Constant [ bool SWOOLE_HAVE_COMPRESSION ] { 1 }
@@ -100,6 +104,7 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Constant [ int SWOOLE_ERROR_OPERATION_NOT_SUPPORT ] { 507 }
Constant [ int SWOOLE_ERROR_PROTOCOL_ERROR ] { 508 }
Constant [ int SWOOLE_ERROR_WRONG_OPERATION ] { 509 }
+ Constant [ int SWOOLE_ERROR_PHP_RUNTIME_NOTICE ] { 510 }
Constant [ int SWOOLE_ERROR_FILE_NOT_EXIST ] { 700 }
Constant [ int SWOOLE_ERROR_FILE_TOO_LARGE ] { 701 }
Constant [ int SWOOLE_ERROR_FILE_EMPTY ] { 702 }
@@ -231,6 +236,9 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Constant [ int SWOOLE_TRACE_CO_CURL ] { 536870912 }
Constant [ int SWOOLE_TRACE_CARES ] { 1073741824 }
Constant [ int SWOOLE_TRACE_ZLIB ] { 2147483648 }
+ Constant [ int SWOOLE_TRACE_CO_PGSQL ] { 4294967296 }
+ Constant [ int SWOOLE_TRACE_CO_ODBC ] { 8589934592 }
+ Constant [ int SWOOLE_TRACE_CO_ORACLE ] { 17179869184 }
Constant [ int SWOOLE_TRACE_ALL ] { 9223372036854775807 }
Constant [ int SWOOLE_LOG_DEBUG ] { 0 }
Constant [ int SWOOLE_LOG_TRACE ] { 1 }
@@ -287,6 +295,10 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Constant [ int SWOOLE_HOOK_NATIVE_CURL ] { 4096 }
Constant [ int SWOOLE_HOOK_BLOCKING_FUNCTION ] { 8192 }
Constant [ int SWOOLE_HOOK_SOCKETS ] { 16384 }
+ Constant [ int SWOOLE_HOOK_PDO_PGSQL ] { 65536 }
+ Constant [ int SWOOLE_HOOK_PDO_ODBC ] { 131072 }
+ Constant [ int SWOOLE_HOOK_PDO_ORACLE ] { 262144 }
+ Constant [ int SWOOLE_HOOK_PDO_SQLITE ] { 524288 }
Constant [ int SWOOLE_HOOK_ALL ] { 2147481599 }
Constant [ int SOCKET_ECANCELED ] { 125 }
Constant [ int SWOOLE_HTTP_CLIENT_ESTATUS_CONNECT_FAILED ] { -1 }
@@ -3768,13 +3780,15 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
}
}
- - Properties [6] {
+ - Properties [8] {
Property [ public $fd = -1 ]
Property [ public $domain = 0 ]
Property [ public $type = 0 ]
Property [ public $protocol = 0 ]
Property [ public $errCode = 0 ]
Property [ public $errMsg = '' ]
+ Property [ public $__ext_sockets_nonblock = false ]
+ Property [ public $__ext_sockets_timeout = 0 ]
}
- Methods [32] {
@@ -5164,13 +5178,14 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
- Static methods [0] {
}
- - Properties [6] {
+ - Properties [7] {
Property [ public $path = '/' ]
Property [ public $method = 'GET' ]
Property [ public $headers = NULL ]
Property [ public $cookies = NULL ]
Property [ public $data = '' ]
Property [ public $pipeline = false ]
+ Property [ public $usePipelineRead = false ]
}
- Methods [0] {
@@ -7808,7 +7823,7 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Property [ public $tmpfiles = NULL ]
}
- - Methods [7] {
+ - Methods [6] {
Method [ <internal:swoole> public method getContent ] {
- Parameters [0] {
@@ -7851,12 +7866,6 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
}
- Return [ string|false ]
}
-
- Method [ <internal:swoole> public method __destruct ] {
-
- - Parameters [0] {
- }
- }
}
}
@@ -7887,7 +7896,7 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Property [ public $trailer = NULL ]
}
- - Methods [22] {
+ - Methods [21] {
Method [ <internal:swoole> public method initHeader ] {
- Parameters [0] {
@@ -8086,12 +8095,6 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
}
- Return [ bool ]
}
-
- Method [ <internal:swoole> public method __destruct ] {
-
- - Parameters [0] {
- }
- }
}
}
@@ -8538,7 +8541,7 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Property [ public $errMsg = '' ]
}
- - Methods [7] {
+ - Methods [6] {
Method [ <internal:swoole, ctor> public method __construct ] {
- Parameters [4] {
@@ -8549,12 +8552,6 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
}
}
- Method [ <internal:swoole> public method __destruct ] {
-
- - Parameters [0] {
- }
- }
-
Method [ <internal:swoole> public method set ] {
- Parameters [1] {
@@ -8574,7 +8571,8 @@ Extension [ <persistent> extension #107 swoole version 5.0.3 ] {
Method [ <internal:swoole> private method onAccept ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> Swoole\Coroutine\Socket $conn ]
}
- Return [ void ]
}
diff --git a/php-pecl-swoole5.spec b/php-pecl-swoole5.spec
index a026054..f461321 100644
--- a/php-pecl-swoole5.spec
+++ b/php-pecl-swoole5.spec
@@ -7,11 +7,10 @@
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%if 0%{?scl:1}
%scl_package php-pecl-swoole5
+%else
+%global _root_prefix %{_prefix}
%endif
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
@@ -21,6 +20,19 @@
%bcond_without cares
%bcond_without nghttpd2
+# disabled by default to avoid dependency on Oracle Instant Client
+%bcond_with oracle
+
+%ifarch aarch64
+%global oraclever 19.19
+%global oraclelib 19.1
+%global oracledir 19.19
+%else
+%global oraclever 21.11
+%global oraclelib 21.1
+%global oracledir 21
+%endif
+
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_without pgsql
@@ -42,9 +54,10 @@
%bcond_without nghttpd2
-%global upstream_version 5.0.3
+%global upstream_version 5.1.0
#global upstream_prever RC2
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: PHP's asynchronous concurrent distributed networking framework
Name: %{?scl_prefix}php-pecl-%{pecl_name}5
@@ -57,9 +70,6 @@ License: Apache-2.0 AND BSD-3-Clause AND MIT
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-Patch0: %{pecl_name}-syslib.patch
-Patch1: %{pecl_name}-php83.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?dtsprefix}gcc-c++
@@ -69,6 +79,7 @@ BuildRequires: %{?scl_prefix}php-curl
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-sockets
BuildRequires: %{?scl_prefix}php-mysqlnd
+BuildRequires: %{?scl_prefix}php-pdo
BuildRequires: pcre-devel
BuildRequires: openssl-devel >= 1.0.2
BuildRequires: zlib-devel
@@ -87,6 +98,19 @@ BuildRequires: libpq-devel
%if %{with nghttpd2}
BuildRequires: libnghttp2-devel
%endif
+BuildRequires: unixODBC-devel
+BuildRequires: sqlite-devel
+%if %{with oracle}
+%ifarch aarch64
+BuildRequires: oracle-instantclient%{oraclever}-devel
+# Should requires libclntsh.so.19.1()(aarch-64), but it's not provided by Oracle RPM.
+Requires: libclntsh.so.%{oraclelib}
+AutoReq: 0
+%else
+BuildRequires: oracle-instantclient-devel >= %{oraclever}
+%endif
+%endif
+
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -94,6 +118,7 @@ Requires: %{?scl_prefix}php-curl%{?_isa}
Requires: %{?scl_prefix}php-json%{?_isa}
Requires: %{?scl_prefix}php-sockets%{?_isa}
Requires: %{?scl_prefix}php-mysqlnd%{?_isa}
+Requires: %{?scl_prefix}php-pdo%{?_isa}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -164,9 +189,6 @@ sed \
cd %{sources}
-%patch -P0 -p1 -b .pr5038
-%patch -P1 -p1 -b .php83
-
cp -p thirdparty/hiredis/COPYING hiredis-COPYING
%if %{with nghttpd2}
rm -r thirdparty/nghttp2
@@ -196,6 +218,7 @@ extension=%{pecl_name}.so
; Configuration
;swoole.enable_coroutine = On
;swoole.enable_library = On
+;swoole.enable_fiber_mock = Off
;swoole.enable_preemptive_scheduler = Off
;swoole.display_errors = On
:swoole.use_shortname = On
@@ -203,8 +226,6 @@ extension=%{pecl_name}.so
EOF
-%global _configure ../%{sources}/configure
-
%build
%{?dtsenable}
@@ -229,8 +250,13 @@ peclbuild() {
--enable-brotli \
%endif
%if %{with nghttpd2}
- --with-nghttp2-dir=%{_prefix} \
+ --with-nghttp2-dir=%{_root_prefix} \
+%endif
+%if %{with oracle}
+ --with-swoole-oracle=instantclient,%{_root_prefix}/lib/oracle/%{oracledir}/client64/lib \
%endif
+ --with-swoole-odbc=unixodbc,%{_root_prefix} \
+ --enable-swoole-sqlite \
--with-libdir=%{_lib} \
--with-php-config=$1
@@ -303,10 +329,10 @@ 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"
+[ -f %{php_extdir}/curl.so ] && OPT="$OPT -d extension=curl"
+[ -f %{php_extdir}/sockets.so ] && OPT="$OPT -d extension=sockets"
+[ -f %{php_extdir}/mysqlnd.so ] && OPT="$OPT -d extension=mysqlnd"
+[ -f %{php_extdir}/pdo.so ] && OPT="$OPT -d extension=pdo"
cd NTS
: Minimal load test for NTS extension
@@ -355,6 +381,13 @@ cd ../ZTS
%changelog
+* Fri Sep 29 2023 Remi Collet <remi@remirepo.net> - 5.1.0-1
+- update to 5.1.0
+- add dependency on pdo extension
+- new coroutine_odbc enabled
+- new coroutine_sqlite enabled
+- new coroutine_oracle disabled
+
* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 5.0.3-2
- add upstream patch for PHP 8.3
diff --git a/swoole-php83.patch b/swoole-php83.patch
deleted file mode 100644
index 7075078..0000000
--- a/swoole-php83.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From db71b11de6facd0d35bacc156a2a8092bb216182 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=E8=99=9E=E7=81=AA?= <995645888@qq.com>
-Date: Sun, 23 Jul 2023 11:47:40 +0800
-Subject: [PATCH] The PHPAPI php_url_encode_hash_ex() function has had its
- signature change (#5099)
-
----
- ext-src/php_swoole_private.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/ext-src/php_swoole_private.h b/ext-src/php_swoole_private.h
-index 8c9f26df65..571808bb8b 100644
---- a/ext-src/php_swoole_private.h
-+++ b/ext-src/php_swoole_private.h
-@@ -957,7 +957,11 @@ static sw_inline char *php_swoole_url_encode(const char *value, size_t value_len
-
- static sw_inline char *php_swoole_http_build_query(zval *zdata, size_t *length, smart_str *formstr) {
- if (HASH_OF(zdata)) {
-- php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, (int) PHP_QUERY_RFC1738);
-+ #if PHP_VERSION_ID < 80300
-+ php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, (int) PHP_QUERY_RFC1738);
-+ #else
-+ php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, NULL, NULL, (int) PHP_QUERY_RFC1738);
-+ #endif
- } else {
- if (formstr->s) {
- smart_str_free(formstr);
diff --git a/swoole-syslib.patch b/swoole-syslib.patch
deleted file mode 100644
index 0c58430..0000000
--- a/swoole-syslib.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 27141691462ed49e42968d77192df62e89f72156 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 26 Apr 2023 17:17:43 +0200
-Subject: [PATCH] use system headers for system libnghttp2
-
----
- config.m4 | 1 +
- ext-src/php_swoole_http.h | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/config.m4 b/config.m4
-index da62b9a704..19fb0698d3 100644
---- a/config.m4
-+++ b/config.m4
-@@ -744,6 +744,7 @@ EOF
- thirdparty/hiredis/sds.c"
-
- if test "$PHP_NGHTTP2_DIR" = "no"; then
-+ PHP_ADD_INCLUDE([$ext_srcdir/thirdparty])
- swoole_source_file="$swoole_source_file \
- thirdparty/nghttp2/nghttp2_hd.c \
- thirdparty/nghttp2/nghttp2_rcbuf.c \
-diff --git a/ext-src/php_swoole_http.h b/ext-src/php_swoole_http.h
-index b43982e5c6..717c2ee4d3 100644
---- a/ext-src/php_swoole_http.h
-+++ b/ext-src/php_swoole_http.h
-@@ -34,7 +34,7 @@
- #define SW_ZLIB_ENCODING_ANY 0x2f
- #endif
-
--#include "thirdparty/nghttp2/nghttp2.h"
-+#include <nghttp2/nghttp2.h>
-
- enum swHttpHeaderFlag {
- HTTP_HEADER_SERVER = 1u << 1,