From fd03650c0df1477ec36905714a5e9c7ec5c087db Mon Sep 17 00:00:00 2001 From: codinghuang Date: Fri, 13 Aug 2021 14:58:12 +0800 Subject: [PATCH 1/4] Update version for Swoole 4.7.1 --- CMakeLists.txt | 2 +- include/swoole_version.h | 4 +- package.xml | 52 +++++++------------- tests/swoole_runtime/file_hook/bug_4327.phpt | 3 +- 4 files changed, 21 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 641bbde5931..fe297de7b54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ PROJECT(libswoole) ENABLE_LANGUAGE(ASM) -set(SWOOLE_VERSION 4.7.1-dev) +set(SWOOLE_VERSION 4.7.1) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g") diff --git a/include/swoole_version.h b/include/swoole_version.h index ad7af8bdd52..a85f8623209 100644 --- a/include/swoole_version.h +++ b/include/swoole_version.h @@ -21,8 +21,8 @@ #define SWOOLE_MAJOR_VERSION 4 #define SWOOLE_MINOR_VERSION 7 #define SWOOLE_RELEASE_VERSION 1 -#define SWOOLE_EXTRA_VERSION "dev" -#define SWOOLE_VERSION "4.7.1-dev" +#define SWOOLE_EXTRA_VERSION "" +#define SWOOLE_VERSION "4.7.1" #define SWOOLE_VERSION_ID 40701 #define SWOOLE_API_VERSION_ID 0x202108a diff --git a/package.xml b/package.xml index 1268fae4839..b902fe9c05c 100644 --- a/package.xml +++ b/package.xml @@ -48,10 +48,10 @@ lufei@php.net yes - 2021-07-16 - + 2021-08-13 + - 4.7.0 + 4.7.1 4.0 @@ -60,42 +60,18 @@ Apache2.0 - New APIs - --- - * Added Process\Pool::detach() (#4221) (@matyhtf) - * Added onDisconnect callback for Swoole\Server (#4230) (@matyhtf) - * Added Coroutine::cancel() (#4247) (#4249) (@matyhtf) - * Added http_compression/body_decompression options for Http Client (#4299) (@matyhtf) - Enhancement --- - * Supported mysql client prepare field type identification (#4238) (@Yurunsoft) - * Supported c-ares, Refactor DNS (#4275) (@matyhtf) - * Supported setting different idle time for each port (#4290) (@matyhtf) - * Supported SW_DISPATCH_CO_CONN_LB and SW_DISPATCH_CO_REQ_LB for Swoole\Server dispatch_mode (#4318) (@matyhtf) - * Supported timeout for Swoole\ConnectionPool::get (swoole/library#108) (@leocavalcante) - * Supported CURLOPT_PRIVATE for Hook Curl (swoole/library#112) (@sy-records) - * Optimized PDOStatementProxy::setFetchMode function prototype (swoole/library#109) (@yespire) + * Supported query /etc/hosts for System::dnsLookup (#4341) (#4349) (@zmyWL) (@NathanFreeman) + * Supported boost context suppoprt for mips64 support (#4358) (@dixyes) + * Supported CURLOPT_RESOLVE option for SWOOLE_HOOK_CURL (swoole/library#107) (@sy-records) Fixed --- - * Fixed uncaught thread creation exception when creating a large number of coroutines (swoole/swoole-src@8ce5041) (@matyhtf) - * Fixed the "make install" missing php_swoole.h header file (#4239) (@sy-records) - * Fixed EVENT_HANDSHAKE BC (#4248) (@sy-records) - * Fixed SW_LOCK_CHECK_RETURN (#4302) (@zmyWL) - * Fixed problems with Swoole\Atomic\Long M1 chip (swoole/swoole-src@e6fae2e) (@matyhtf) - * Fixed missing return value of Coroutine\go (swoole/library@1ed49db) (@matyhtf) - * Fixed StringObject consistency between other methods and its immutability (swoole/library#111) (@leocavalcante) - * Fixed StringObject substr error (swoole/library#113) (@sy-records) - - Kernel - --- - * Did not hook disabled functions (#4283) (@twose) - - Test - --- - * Added Cygwin build (#4222) (@sy-records) - * Added alpine 3.13 and 3.14 into building test (#4309) (@limingxinleo) + * Fixed memory error on shutdown (PHP-8.1) (#4325) (@twose) + * Fixed not serializable classes for 8.1.0beta1 (#4335) (@remicollet) + * Fixed multiple coroutines recursively creating directories (#4337) (@NathanFreeman) + * Fixed native curl bugs (#4360) (@matyhtf) @@ -482,12 +458,12 @@ - + @@ -969,6 +945,7 @@ + @@ -1151,6 +1128,7 @@ + @@ -1228,6 +1206,7 @@ + @@ -1594,6 +1573,7 @@ + @@ -2006,6 +1986,7 @@ + @@ -2031,6 +2012,7 @@ + diff --git a/tests/swoole_runtime/file_hook/bug_4327.phpt b/tests/swoole_runtime/file_hook/bug_4327.phpt index 7b4311f197e..d776fad8703 100644 --- a/tests/swoole_runtime/file_hook/bug_4327.phpt +++ b/tests/swoole_runtime/file_hook/bug_4327.phpt @@ -1,5 +1,5 @@ --TEST-- -mkdir failed when coroutines: bug #4372 +swoole_runtime/file_hook: bug #4372 --SKIPIF-- - --EXPECT-- SUCCESS SUCCESS From 0ebeef2e800ec18f52c4ed8e41be7208145407a4 Mon Sep 17 00:00:00 2001 From: matyhtf Date: Fri, 13 Aug 2021 18:02:43 +0800 Subject: [PATCH 2/4] Optimize code --- include/swoole.h | 4 ++-- src/core/base.cc | 2 +- src/network/dns.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/swoole.h b/include/swoole.h index 990f05a3977..6099cedafab 100644 --- a/include/swoole.h +++ b/include/swoole.h @@ -703,8 +703,8 @@ SW_API const char *swoole_strerror(int code); SW_API void swoole_throw_error(int code); SW_API void swoole_set_log_level(int level); SW_API void swoole_set_trace_flags(int flags); -SW_API void swoole_set_dns_server(const std::string server); -SW_API void swoole_set_hosts_path(char *hosts_file); +SW_API void swoole_set_dns_server(const std::string &server); +SW_API void swoole_set_hosts_path(const std::string &hosts_file); SW_API std::pair swoole_get_dns_server(); SW_API bool swoole_load_resolv_conf(); diff --git a/src/core/base.cc b/src/core/base.cc index df76968b83f..d9f9decb2a4 100644 --- a/src/core/base.cc +++ b/src/core/base.cc @@ -251,7 +251,7 @@ SW_API void swoole_set_trace_flags(int flags) { SwooleG.trace_flags = flags; } -SW_API void swoole_set_dns_server(const std::string server) { +SW_API void swoole_set_dns_server(const std::string &server) { char *_port; int dns_server_port = SW_DNS_SERVER_PORT; char dns_server_host[32]; diff --git a/src/network/dns.cc b/src/network/dns.cc index 41be744911c..3678c9c36ee 100644 --- a/src/network/dns.cc +++ b/src/network/dns.cc @@ -57,7 +57,7 @@ bool swoole_load_resolv_conf() { return true; } -void swoole_set_hosts_path(const char *hosts_file) { +void swoole_set_hosts_path(const std::string &hosts_file) { SwooleG.dns_hosts_path = hosts_file; } From ff32427d4a486a2c203a350ad1dde72380445e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=94=81?= <52o@qq52o.cn> Date: Fri, 13 Aug 2021 18:38:18 +0800 Subject: [PATCH 3/4] Update package.xml --- package.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.xml b/package.xml index b902fe9c05c..e4ea1d23318 100644 --- a/package.xml +++ b/package.xml @@ -65,6 +65,7 @@ * Supported query /etc/hosts for System::dnsLookup (#4341) (#4349) (@zmyWL) (@NathanFreeman) * Supported boost context suppoprt for mips64 support (#4358) (@dixyes) * Supported CURLOPT_RESOLVE option for SWOOLE_HOOK_CURL (swoole/library#107) (@sy-records) + * Support CURLOPT_NOPROGRESS for SWOOLE_HOOK_CURL (swoole/library#117) (@sy-records) Fixed --- @@ -72,6 +73,7 @@ * Fixed not serializable classes for 8.1.0beta1 (#4335) (@remicollet) * Fixed multiple coroutines recursively creating directories (#4337) (@NathanFreeman) * Fixed native curl bugs (#4360) (@matyhtf) + * Fixed PDOStatement::bindParam() expects parameter 1 to be string (swoole/library#116) (@sy-records) From 41e1f907184cd8248b404f473d8b2454ac3efd90 Mon Sep 17 00:00:00 2001 From: Bruce Dou Date: Fri, 13 Aug 2021 14:40:23 +0100 Subject: [PATCH 4/4] Added introducing a new concurrency mode (#4330) --- package.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.xml b/package.xml index e4ea1d23318..6e0ca10c16a 100644 --- a/package.xml +++ b/package.xml @@ -60,6 +60,10 @@ Apache2.0 + New feature + --- + * Introduce a new concurrency mode (#4330) (@doubaokun) + Enhancement --- * Supported query /etc/hosts for System::dnsLookup (#4341) (#4349) (@zmyWL) (@NathanFreeman)