Skip to content

Commit

Permalink
Update version for Swoole 4.6.1 (#3996)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghantao authored Jan 11, 2021
1 parent 3d4c2d7 commit 48498a4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 61 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PROJECT(libswoole)

ENABLE_LANGUAGE(ASM)
SET(SWOOLE_VERSION 4.6.0)
SET(SWOOLE_VERSION 4.6.1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g")
Expand Down
31 changes: 21 additions & 10 deletions ext-src/php_swoole_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Generated by build-library.php, Please DO NOT modify!
*/

/* $Id: f1ce9bcc9b378dc1d233b63cf4acaf854d0ec744 */
/* $Id: 59f277126e24cdce28e80f0f45070b9df857add2 */

static const char* swoole_library_source_constants =
"\n"
Expand Down Expand Up @@ -3988,9 +3988,20 @@ static const char* swoole_library_source_core_curl_handler =
" * Http Proxy\n"
" */\n"
" if ($this->proxy) {\n"
" $proxy = explode(':', $this->proxy);\n"
" $proxyPort = $proxy[1] ?? $this->proxyPort;\n"
" $proxy = $proxy[0];\n"
" $parse = parse_url($this->proxy);\n"
" $proxy = $parse['host'] ?? $parse['path'];\n"
" $proxyPort = $parse['port'] ?? $this->proxyPort;\n"
" $proxyUsername = $parse['user'] ?? $this->proxyUsername;\n"
" $proxyPassword = $parse['pass'] ?? $this->proxyPassword;\n"
" $proxyType = $parse['scheme'] ?? $this->proxyType;\n"
" if (is_string($proxyType)) {\n"
" if ($proxyType === 'socks5') {\n"
" $proxyType = CURLPROXY_SOCKS5;\n"
" } else {\n"
" $proxyType = CURLPROXY_HTTP;\n"
" }\n"
" }\n"
"\n"
" if (!filter_var($proxy, FILTER_VALIDATE_IP)) {\n"
" $ip = Swoole\\Coroutine::gethostbyname($proxy, AF_INET, $this->clientOptions['connect_timeout'] ?? -1);\n"
" if (!$ip) {\n"
Expand All @@ -3999,25 +4010,25 @@ static const char* swoole_library_source_core_curl_handler =
" }\n"
" $this->proxy = $proxy = $ip;\n"
" }\n"
" switch ($this->proxyType) {\n"
" switch ($proxyType) {\n"
" case CURLPROXY_HTTP:\n"
" $proxyOptions = [\n"
" 'http_proxy_host' => $proxy,\n"
" 'http_proxy_port' => $proxyPort,\n"
" 'http_proxy_username' => $this->proxyUsername,\n"
" 'http_proxy_password' => $this->proxyPassword,\n"
" 'http_proxy_username' => $proxyUsername,\n"
" 'http_proxy_password' => $proxyPassword,\n"
" ];\n"
" break;\n"
" case CURLPROXY_SOCKS5:\n"
" $proxyOptions = [\n"
" 'socks5_host' => $proxy,\n"
" 'socks5_port' => $proxyPort,\n"
" 'socks5_username' => $this->proxyUsername,\n"
" 'socks5_password' => $this->proxyPassword,\n"
" 'socks5_username' => $proxyUsername,\n"
" 'socks5_password' => $proxyPassword,\n"
" ];\n"
" break;\n"
" default:\n"
" throw new CurlException(\"Unexpected proxy type [{$this->proxyType}]\");\n"
" throw new CurlException(\"Unexpected proxy type [{$proxyType}]\");\n"
" }\n"
" }\n"
" /*\n"
Expand Down
6 changes: 3 additions & 3 deletions include/swoole_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

#define SWOOLE_MAJOR_VERSION 4
#define SWOOLE_MINOR_VERSION 6
#define SWOOLE_RELEASE_VERSION 0
#define SWOOLE_RELEASE_VERSION 1
#define SWOOLE_EXTRA_VERSION ""
#define SWOOLE_VERSION "4.6.0"
#define SWOOLE_VERSION_ID 40600
#define SWOOLE_VERSION "4.6.1"
#define SWOOLE_VERSION_ID 40601
#define SWOOLE_API_VERSION_ID 0x202012a

#define SWOOLE_BUG_REPORT \
Expand Down
60 changes: 13 additions & 47 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
<email>[email protected]</email>
<active>yes</active>
</developer>
<date>2021-01-06</date>
<time>15:00:00</time>
<date>2021-01-11</date>
<time>18:00:00</time>
<version>
<release>4.6.0</release>
<release>4.6.1</release>
<api>4.0</api>
</version>
<stability>
Expand All @@ -54,58 +54,22 @@
</stability>
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license>
<notes>
Backward compatibility Break
---
* Removed the maximum limit of session id, never repeat (#3879) (@matyhtf)
* Disabled unsafe function when use Coroutine, including pcntl_fork/pcntl_wait/pcntl_waitpid/pcntl_sigtimedwait (#3880) (@matyhtf)
* Enabled coroutine hook by default (#3903) (@matyhtf)

Remove
---
- No longer support PHP-7.1 (swoole/swoole-src@4a963df) (swoole/swoole-src@9de8d9e) (@matyhtf)

Deprecated
---
- Marked the Event::rshutdown() as deprecated, please use Coroutine::run instead (#3881) (@matyhtf)

New APIs
---
+ Supported setPriority/getPriority (#3876) (@matyhtf)
+ Supported native-curl hook (#3863) (@matyhtf) (@huanghantao)
+ Supported object style callback parameters for Server, off by default (#3888) (@matyhtf)
+ Supported ext-sockets hook (#3898) (@matyhtf)
+ Supported duplicate header (#3905) (@matyhtf)
+ Supported SSL sni (#3908) (@matyhtf)
+ Supported hook stdio (#3924) (@matyhtf)
+ Supported capture_peer_cert option for stream_socket (#3930) (@matyhtf)
+ Added Http\Request::create/parse/isCompleted (#3938) (@matyhtf)
+ Added Http\Response::isWritable (swoole/swoole-src@db56827) (@matyhtf)

Enhancement
---
+ All time accuracy of Server changed from int to double (#3882) (@matyhtf)
+ Added poll EINTR check for swoole_client_select (#3909) (@shiguangqi)
+ Added coroutine deadlock detect (#3911) (@matyhtf)
+ Supported closing the connection in another process with server base mode (#3916) (@matyhtf)
+ Optimized send to worker from master, reduced memory copy (#3910) (@huanghantao) (@matyhtf)
+ Added --enable-thread-context option (#3970) (@matyhtf)
+ Strict session_id, check the connection activity (#3993) (@matyhtf)
* Optimized CURLOPT_PROXY, support user, pass and scheme (swoole/library#87) (sy-records)

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

Kernel
---
* Ignored SIGPIPE signal by default (swoole/swoole-src@9647678) (@matyhtf)
* Supported running php and c coroutines at same time (swoole/swoole-src@c94bfd8) (@matyhtf)
* Added TEST(coroutine_base, get_elapsed) (#3961) (@luolaifa000)
* Added TEST(coroutine_base, get_init_msec) (#3964) (@luffluo)
* Optimized ipc writev, avoid coredump how event data is null (#3994) (@matyhtf)
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -856,6 +820,7 @@
<file role="test" name="tests/swoole_client_coro/connect_timeout.phpt" />
<file role="test" name="tests/swoole_client_coro/connect_with_dns.phpt" />
<file role="test" name="tests/swoole_client_coro/dtls.phpt" />
<file role="test" name="tests/swoole_client_coro/enableSSL.phpt" />
<file role="test" name="tests/swoole_client_coro/eof.phpt" />
<file role="test" name="tests/swoole_client_coro/eof_02.phpt" />
<file role="test" name="tests/swoole_client_coro/eof_03.phpt" />
Expand Down Expand Up @@ -1715,6 +1680,7 @@
<file role="test" name="tests/swoole_server/sigint_with_process.phpt" />
<file role="test" name="tests/swoole_server/sleep.phpt" />
<file role="test" name="tests/swoole_server/slow_client.phpt" />
<file role="test" name="tests/swoole_server/slow_worker.phpt" />
<file role="test" name="tests/swoole_server/ssl/00.phpt" />
<file role="test" name="tests/swoole_server/ssl/bad_client.phpt" />
<file role="test" name="tests/swoole_server/ssl/code/client.go" />
Expand Down

0 comments on commit 48498a4

Please sign in to comment.