Skip to content

Commit 48498a4

Browse files
authored
Update version for Swoole 4.6.1 (#3996)
1 parent 3d4c2d7 commit 48498a4

File tree

4 files changed

+38
-61
lines changed

4 files changed

+38
-61
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PROJECT(libswoole)
22

33
ENABLE_LANGUAGE(ASM)
4-
SET(SWOOLE_VERSION 4.6.0)
4+
SET(SWOOLE_VERSION 4.6.1)
55

66
set(CMAKE_CXX_STANDARD 11)
77
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g")

ext-src/php_swoole_library.h

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Generated by build-library.php, Please DO NOT modify!
33
*/
44

5-
/* $Id: f1ce9bcc9b378dc1d233b63cf4acaf854d0ec744 */
5+
/* $Id: 59f277126e24cdce28e80f0f45070b9df857add2 */
66

77
static const char* swoole_library_source_constants =
88
"\n"
@@ -3988,9 +3988,20 @@ static const char* swoole_library_source_core_curl_handler =
39883988
" * Http Proxy\n"
39893989
" */\n"
39903990
" if ($this->proxy) {\n"
3991-
" $proxy = explode(':', $this->proxy);\n"
3992-
" $proxyPort = $proxy[1] ?? $this->proxyPort;\n"
3993-
" $proxy = $proxy[0];\n"
3991+
" $parse = parse_url($this->proxy);\n"
3992+
" $proxy = $parse['host'] ?? $parse['path'];\n"
3993+
" $proxyPort = $parse['port'] ?? $this->proxyPort;\n"
3994+
" $proxyUsername = $parse['user'] ?? $this->proxyUsername;\n"
3995+
" $proxyPassword = $parse['pass'] ?? $this->proxyPassword;\n"
3996+
" $proxyType = $parse['scheme'] ?? $this->proxyType;\n"
3997+
" if (is_string($proxyType)) {\n"
3998+
" if ($proxyType === 'socks5') {\n"
3999+
" $proxyType = CURLPROXY_SOCKS5;\n"
4000+
" } else {\n"
4001+
" $proxyType = CURLPROXY_HTTP;\n"
4002+
" }\n"
4003+
" }\n"
4004+
"\n"
39944005
" if (!filter_var($proxy, FILTER_VALIDATE_IP)) {\n"
39954006
" $ip = Swoole\\Coroutine::gethostbyname($proxy, AF_INET, $this->clientOptions['connect_timeout'] ?? -1);\n"
39964007
" if (!$ip) {\n"
@@ -3999,25 +4010,25 @@ static const char* swoole_library_source_core_curl_handler =
39994010
" }\n"
40004011
" $this->proxy = $proxy = $ip;\n"
40014012
" }\n"
4002-
" switch ($this->proxyType) {\n"
4013+
" switch ($proxyType) {\n"
40034014
" case CURLPROXY_HTTP:\n"
40044015
" $proxyOptions = [\n"
40054016
" 'http_proxy_host' => $proxy,\n"
40064017
" 'http_proxy_port' => $proxyPort,\n"
4007-
" 'http_proxy_username' => $this->proxyUsername,\n"
4008-
" 'http_proxy_password' => $this->proxyPassword,\n"
4018+
" 'http_proxy_username' => $proxyUsername,\n"
4019+
" 'http_proxy_password' => $proxyPassword,\n"
40094020
" ];\n"
40104021
" break;\n"
40114022
" case CURLPROXY_SOCKS5:\n"
40124023
" $proxyOptions = [\n"
40134024
" 'socks5_host' => $proxy,\n"
40144025
" 'socks5_port' => $proxyPort,\n"
4015-
" 'socks5_username' => $this->proxyUsername,\n"
4016-
" 'socks5_password' => $this->proxyPassword,\n"
4026+
" 'socks5_username' => $proxyUsername,\n"
4027+
" 'socks5_password' => $proxyPassword,\n"
40174028
" ];\n"
40184029
" break;\n"
40194030
" default:\n"
4020-
" throw new CurlException(\"Unexpected proxy type [{$this->proxyType}]\");\n"
4031+
" throw new CurlException(\"Unexpected proxy type [{$proxyType}]\");\n"
40214032
" }\n"
40224033
" }\n"
40234034
" /*\n"

include/swoole_version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121
#define SWOOLE_MAJOR_VERSION 4
2222
#define SWOOLE_MINOR_VERSION 6
23-
#define SWOOLE_RELEASE_VERSION 0
23+
#define SWOOLE_RELEASE_VERSION 1
2424
#define SWOOLE_EXTRA_VERSION ""
25-
#define SWOOLE_VERSION "4.6.0"
26-
#define SWOOLE_VERSION_ID 40600
25+
#define SWOOLE_VERSION "4.6.1"
26+
#define SWOOLE_VERSION_ID 40601
2727
#define SWOOLE_API_VERSION_ID 0x202012a
2828

2929
#define SWOOLE_BUG_REPORT \

package.xml

Lines changed: 13 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
<email>[email protected]</email>
4343
<active>yes</active>
4444
</developer>
45-
<date>2021-01-06</date>
46-
<time>15:00:00</time>
45+
<date>2021-01-11</date>
46+
<time>18:00:00</time>
4747
<version>
48-
<release>4.6.0</release>
48+
<release>4.6.1</release>
4949
<api>4.0</api>
5050
</version>
5151
<stability>
@@ -54,58 +54,22 @@
5454
</stability>
5555
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license>
5656
<notes>
57-
Backward compatibility Break
58-
---
59-
* Removed the maximum limit of session id, never repeat (#3879) (@matyhtf)
60-
* Disabled unsafe function when use Coroutine, including pcntl_fork/pcntl_wait/pcntl_waitpid/pcntl_sigtimedwait (#3880) (@matyhtf)
61-
* Enabled coroutine hook by default (#3903) (@matyhtf)
62-
63-
Remove
64-
---
65-
- No longer support PHP-7.1 (swoole/swoole-src@4a963df) (swoole/swoole-src@9de8d9e) (@matyhtf)
66-
67-
Deprecated
68-
---
69-
- Marked the Event::rshutdown() as deprecated, please use Coroutine::run instead (#3881) (@matyhtf)
70-
71-
New APIs
72-
---
73-
+ Supported setPriority/getPriority (#3876) (@matyhtf)
74-
+ Supported native-curl hook (#3863) (@matyhtf) (@huanghantao)
75-
+ Supported object style callback parameters for Server, off by default (#3888) (@matyhtf)
76-
+ Supported ext-sockets hook (#3898) (@matyhtf)
77-
+ Supported duplicate header (#3905) (@matyhtf)
78-
+ Supported SSL sni (#3908) (@matyhtf)
79-
+ Supported hook stdio (#3924) (@matyhtf)
80-
+ Supported capture_peer_cert option for stream_socket (#3930) (@matyhtf)
81-
+ Added Http\Request::create/parse/isCompleted (#3938) (@matyhtf)
82-
+ Added Http\Response::isWritable (swoole/swoole-src@db56827) (@matyhtf)
83-
8457
Enhancement
8558
---
86-
+ All time accuracy of Server changed from int to double (#3882) (@matyhtf)
87-
+ Added poll EINTR check for swoole_client_select (#3909) (@shiguangqi)
88-
+ Added coroutine deadlock detect (#3911) (@matyhtf)
89-
+ Supported closing the connection in another process with server base mode (#3916) (@matyhtf)
90-
+ Optimized send to worker from master, reduced memory copy (#3910) (@huanghantao) (@matyhtf)
59+
+ Added --enable-thread-context option (#3970) (@matyhtf)
60+
+ Strict session_id, check the connection activity (#3993) (@matyhtf)
61+
* Optimized CURLOPT_PROXY, support user, pass and scheme (swoole/library#87) (sy-records)
9162

9263
Fixed
9364
---
94-
* Pop Coroutine::Channel data when channel is closed (swoole/swoole-src@960431d) (@matyhtf)
95-
* Fixed memory error when use JIT (#3907) (@twose)
96-
* Fixed port->set() dtls compile error (#3947) (@Yurunsoft)
97-
* Fixed connection_list error (#3948) (@sy-records)
98-
* Fixed ssl verify (#3954) (@matyhtf)
99-
* Clear all columns when incr and decr (#3956) (@matyhtf) (@sy-records)
100-
* Fixed failed to compile with LibreSSL 2.7.5 (#3962) (@matyhtf)
101-
* Fixed undefined constant CURLOPT_HEADEROPT and CURLOPT_PROXYHEADER
65+
* Fixed minimal PHP version (#3979) (@remicollet)
66+
* Fixed pecl install missing enable-swoole-json and enable-swoole-curl options (#3980) (@sy-records)
67+
* Fixed openssl thread safety issue (swoole/swoole-src@b516d69) (@matyhtf)
68+
* Fixed enableSSL coredump (#3990) (@huanghantao)
10269

10370
Kernel
10471
---
105-
* Ignored SIGPIPE signal by default (swoole/swoole-src@9647678) (@matyhtf)
106-
* Supported running php and c coroutines at same time (swoole/swoole-src@c94bfd8) (@matyhtf)
107-
* Added TEST(coroutine_base, get_elapsed) (#3961) (@luolaifa000)
108-
* Added TEST(coroutine_base, get_init_msec) (#3964) (@luffluo)
72+
* Optimized ipc writev, avoid coredump how event data is null (#3994) (@matyhtf)
10973
</notes>
11074
<contents>
11175
<dir name="/">
@@ -856,6 +820,7 @@
856820
<file role="test" name="tests/swoole_client_coro/connect_timeout.phpt" />
857821
<file role="test" name="tests/swoole_client_coro/connect_with_dns.phpt" />
858822
<file role="test" name="tests/swoole_client_coro/dtls.phpt" />
823+
<file role="test" name="tests/swoole_client_coro/enableSSL.phpt" />
859824
<file role="test" name="tests/swoole_client_coro/eof.phpt" />
860825
<file role="test" name="tests/swoole_client_coro/eof_02.phpt" />
861826
<file role="test" name="tests/swoole_client_coro/eof_03.phpt" />
@@ -1715,6 +1680,7 @@
17151680
<file role="test" name="tests/swoole_server/sigint_with_process.phpt" />
17161681
<file role="test" name="tests/swoole_server/sleep.phpt" />
17171682
<file role="test" name="tests/swoole_server/slow_client.phpt" />
1683+
<file role="test" name="tests/swoole_server/slow_worker.phpt" />
17181684
<file role="test" name="tests/swoole_server/ssl/00.phpt" />
17191685
<file role="test" name="tests/swoole_server/ssl/bad_client.phpt" />
17201686
<file role="test" name="tests/swoole_server/ssl/code/client.go" />

0 commit comments

Comments
 (0)