Skip to content

Commit

Permalink
Update version for Swoole 4.5.3RC1 (#3588)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghantao authored Aug 24, 2020
1 parent 3aa03bb commit 66f70f6
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 22 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.5.3-alpha)
SET(SWOOLE_VERSION 4.5.3RC1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g")
Expand Down
4 changes: 2 additions & 2 deletions include/swoole_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#define SWOOLE_MAJOR_VERSION 4
#define SWOOLE_MINOR_VERSION 5
#define SWOOLE_RELEASE_VERSION 3
#define SWOOLE_EXTRA_VERSION "rc1"
#define SWOOLE_VERSION "4.5.3-rc1"
#define SWOOLE_EXTRA_VERSION "RC1"
#define SWOOLE_VERSION "4.5.3RC1"
#define SWOOLE_VERSION_ID 40503
#define SWOOLE_API_VERSION_ID 0x202008a

Expand Down
101 changes: 84 additions & 17 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>2020-08-14</date>
<date>2020-08-22</date>
<time>19:00:00</time>
<version>
<release>4.5.2</release>
<release>4.5.3RC1</release>
<api>4.0</api>
</version>
<stability>
Expand All @@ -54,29 +54,91 @@
</stability>
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license>
<notes>
New APIs
---
+ Added `Swoole\Process\ProcessManager` (swoole/library#88f147b) (@huanghantao)
+ Added ArrayObject::append, StringObject::equals (swoole/library#f28556f) (@matyhtf)
+ Added Coroutine::parallel (swoole/library#6aa89a9) (@matyhtf)
+ Added Coroutine\Barrier (swoole/library#2988b2a) (@matyhtf)

Enhancement
---
+ Support `Server->set(['log_rotation' => SWOOLE_LOG_ROTATION_DAILY])` to generate log file by date (#3311) (@matyhtf)
+ Support `swoole_async_set(['wait_signal' => true])`, reactor will not exit if there is signal listener (#3314) (@matyhtf)
+ Support `Server->sendfile` to send empty file (#3318) (@twose)
+ Improve worker idle warning (#3328) (@huanghantao)
+ Improve configuration parser about Host (for HTTPS proxy) (#3343) (@twose)
+ SSL use ecdh auto (#3316) (@matyhtf)
+ SSL quiet shutdown when client close (#3342) (@huanghantao)
+ Added usePipelineRead to support streaming call in http2 client (#3354) (@twose)
+ Do not create file before recv body when download (#3381) (@twose)
+ Added `bind_address` and `bind_port` setting for coroutine http client (#3390) (@huanghantao)
+ Added `lowercase_header` option for HttpClient (#3399) (@matyhtf)
+ Added `tcp_user_timeout` option for `Swoole\Server` (#3404) (@huanghantao)
+ Added `Coroutine\Socket` event barrier (#3409) (@matyhtf)
+ Added specify swString memory allocator (#3418) (@matyhtf)
+ Support cURL `__toString` (swoole/library#38) (@twose)
+ Added `lowercase_header` to fix cURL header name (swoole/library#e7c2a82) (@twose)
+ Set wait count directly in WaitGroup constructor (swoole/library#2fb228b8) (@matyhtf)
+ Added `CURLOPT_REDIR_PROTOCOLS` (swoole/library#46) (@sy-records)
+ Added HTTP 1.1 support trailer (#3485) (@huanghantao)
+ Support yield when sleep time less 1ms (#3487) (@Yurunsoft)
+ Support get soft link file in static handler (#3569) (@LeiZhang-Hunter)
+ Close websocket connection immediately after server call close method (#3570) (@matyhtf)
+ Support hook stream_set_blocking (#3585) (@Yurunsoft)
+ Support HTTP2 flow control in async HTTP2 Server (#3486) (@huanghantao) (@matyhtf)
+ Support free socket buffer after onPackage is called (#3551) (@huanghantao) (@matyhtf)

Fixed
---
* Fixed `Server->taskWait` on OSX (#3330) (@matyhtf)
* Fixed MQTT protocol bug (8dbf506b) (@guoxinhua) (2ae8eb32) (@twose)
* Fixed Content-Length int overflow (#3346) (@twose)
* Fixed packet length checker of PRI (#3348) (@twose)
* Fixed CURLOPT_POSTFIELDS (swoole/library@ed192f64) (@twose)
* Fixed the latest connection can not be released before accept new one (swoole/library@1ef79339) (@twose)
* Fixed Websocket coredump (#3359) (@twose)
* Fixed swSignalfd_setup and fix possible nullptr error in wait_signal (#3360) (@twose)
* Fixed `Swoole\Server::close` throw a error when set dispatch_func (#3365) (@twose)
* Fixed format_buffer init problem when use `Swoole\Redis\Server::format` (#3369) (@matyhtf) (@twose)
* Fixed get mac address in OSX (#3372) (@twose)
* Fixed mysql test case (#3374) (@qiqizjl)
* Fixed PHP8 compatibility (#3384) (#3458) (#3578) (@twose)
* Fixed missing php_error_docref, timeout_event and return value in hook socket write and read (#3383) (@twose)
* Fixed the server could not be stopped during the `WorkerStart` phase (#3382) (@huanghantao)
* Fixed coredump because of heart thread operate conn->socket (#3396) (@huanghantao)
* Fixed send yield logic bug (#3397) (@twose) (@matyhtf)
* Fixed compile problem in Cygwin64 (#3400) (@twose)
* Fixed websocket finish property invalid (#3410) (@matyhtf)
* Fixed build error when lose sys/random.h (#3427) (@huanghantao)
* Fixed missing MySQL transaction error, update the test (#3429) (@twose)
* Fixed the result of `stream_select` (#3440) (@Yurunsoft)
* Fixed lose `SIGCHLD` when use `Coroutine\System` to create child process (#3446) (@huanghantao)
* Fixed sendwait not support ssl mode (#3459) (@huanghantao)
* Fixed `ArrayObject` and `StringObject` bug (swoole/library#44) (@matyhtf)
* Fixed mysqli error (swoole/library#45) (@sy-records)
* Fixed can not get correct Swoole\Client::errCode if `open_eof_check` is set (#3478) (@huanghantao)
* Fixed fix atomic->wait()/wakeup() in MacOS (#3476) (@Yurunsoft)
* Fixed fix Client::connect return 0 when serve refused (#3484) (@matyhtf)
* Fixed nullptr_t is not declared in alpine (#3488) (@limingxinleo)
* Fixed fix HTTP Client download filename bug, double free memory (#3489) (@Yurunsoft)
* Fixed fix memory leak of Server\Port (#3507) (@twose)
* Fixed fix mqtt parse protocal error (318e33a) (84d8214) (80327b3) (efe6c63) (@GXhua) (@sy-records)
* Fixed Coroutine\Http\Client->getHeaderOut coredump (#3534) (@matyhtf)
* Fixed missing error info of SSL verify (#3535) (@twose)
* Fixed update Swoole benchmark link in README (#3536) (@sy-records) (@santalex)
* Fixed fix HTTP header/cookie injection when use CRLF (#3539) (#3541) (#3545) (chromium1337) (@huanghantao)
* Fixed fix the typo variable in #3463 (#3547) (chromium1337) (@huanghantao)
* Fixed the typo introduced in pull request #3463 (#3547) (@deminy)
* Fixed set coroutine websocket server frame->fd (#3549) (@huanghantao)
* Fixed connection leak when heart thread check connection status (#3534) (@matyhtf)
* Fixed don't need block signals (#3582) (@huanghantao) (@matyhtf)
* Fixed don't send headers by SAPI (#3571) (@twose) (@sshymko)
* Fixed set error code and error message when curl execution fails (swoole/library#1b6c65e) (@sy-records)

Kernel
---
* Socket zero copy feature (#3327) (@twose)
* Use swoole_get_last_error/swoole_set_last_error to replace global vars (e25f262a) (@matyhtf) (#3315) (@huanghantao)
* Use the CPP style (#3349) (#3351) (#3454) (#3479) (#3490) (@huanghantao) (@matyhtf)
* Added Swoole known strings to improve PHP object property reading (#3363) (@huanghantao)
* Improve code (#3350) (#3356) (#3357) (#3423) (#3426) (#3461) (#3463) (#3472) (#3557) (#3583) (@huanghantao) (@twose) (@matyhtf)
* Optimize tests (#3416) (#3481) (#3558) (@matyhtf)
* Simplify table int type (#3407) (@matyhtf)
* Added sw_memset_zero and replace bzero (#3419) (@CismonX)
* Optimize log module (#3432) (@matyhtf)
* Refactor libswoole (#3448) (#3473) (#3475) (#3492) (#3494) (#3497) (#3498) (#3526) (@matyhtf)
* Refactor header deps (#3457) (@matyhtf) (@huanghantao)
* Added `Channel::count()` and `Channel::get_bytes()` (f001581) (@matyhtf)
* Added add scope guard (#3504) (@huanghantao)
* Added libswoole coverage test (#3431) (@huanghantao)
* Added lib-swoole/ext-swoole MacOS test (#3521) (@huanghantao)
* Added lib-swoole/ext-swoole Alpine test (#3537) (@limingxinleo)
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -1175,6 +1237,8 @@
<file role="test" name="tests/swoole_http_server/error_413.phpt" />
<file role="test" name="tests/swoole_http_server/form_data_with_charset.phpt" />
<file role="test" name="tests/swoole_http_server/head_method.phpt" />
<file role="test" name="tests/swoole_http_server/headers_sent.phpt" />
<file role="test" name="tests/swoole_http_server/headers_sent_coroutine.phpt" />
<file role="test" name="tests/swoole_http_server/http_autoindex.phpt" />
<file role="test" name="tests/swoole_http_server/http_index_files.phpt" />
<file role="test" name="tests/swoole_http_server/http_index_files_autoindex.phpt" />
Expand Down Expand Up @@ -1381,6 +1445,8 @@
<file role="test" name="tests/swoole_process_pool/reuse_port.phpt" />
<file role="test" name="tests/swoole_process_pool/shutdown.phpt" />
<file role="test" name="tests/swoole_process_pool/socket_coro.phpt" />
<file role="test" name="tests/swoole_process_pool/start_pool_twice_in_same_process.phpt" />
<file role="test" name="tests/swoole_process_pool/start_twice.phpt" />
<file role="test" name="tests/swoole_redis_coro/auth.phpt" />
<file role="test" name="tests/swoole_redis_coro/auto_reconnect.phpt" />
<file role="test" name="tests/swoole_redis_coro/auto_reconnect_ex.phpt" />
Expand Down Expand Up @@ -1482,6 +1548,7 @@
<file role="test" name="tests/swoole_runtime/stream_select/preserve_keys.phpt" />
<file role="test" name="tests/swoole_runtime/stream_select/return_val.phpt" />
<file role="test" name="tests/swoole_runtime/stream_select/rw_events.phpt" />
<file role="test" name="tests/swoole_runtime/stream_select/stream_set_blocking.phpt" />
<file role="test" name="tests/swoole_runtime/stream_select/timeout.phpt" />
<file role="test" name="tests/swoole_runtime/stream_socket_pair.phpt" />
<file role="test" name="tests/swoole_runtime/tcp-c10k.phpt" />
Expand Down
98 changes: 98 additions & 0 deletions php_swoole_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -6349,6 +6349,103 @@ static const char* swoole_library_source_core_coroutine_fast_cgi_proxy =
" }\n"
"}\n";

static const char* swoole_library_source_core_process_process_manager =
"\n"
"/**\n"
" * This file is part of Swoole.\n"
" *\n"
" * @link https://www.swoole.com\n"
" * @contact [email protected]\n"
" * @license https://github.com/swoole/library/blob/master/LICENSE\n"
" */\n"
"\n"
"declare(strict_types=1);\n"
"\n"
"namespace Swoole\\Process;\n"
"\n"
"use Swoole\\Constant;\n"
"use function Swoole\\Coroutine\\run;\n"
"\n"
"class ProcessManager\n"
"{\n"
" /**\n"
" * @var Pool\n"
" */\n"
" protected $pool;\n"
"\n"
" /**\n"
" * @var int\n"
" */\n"
" protected $ipcType = SWOOLE_IPC_NONE;\n"
"\n"
" /**\n"
" * @var int\n"
" */\n"
" protected $msgQueueKey = 0;\n"
"\n"
" /**\n"
" * @var array\n"
" */\n"
" protected $startFuncMap = [];\n"
"\n"
" public function __construct(int $ipcType = SWOOLE_IPC_NONE, int $msgQueueKey = 0)\n"
" {\n"
" $this->setIPCType($ipcType)->setMsgQueueKey($msgQueueKey);\n"
" }\n"
"\n"
" public function add(callable $func, bool $enableCoroutine = false): self\n"
" {\n"
" $this->addBatch(1, $func, $enableCoroutine);\n"
" return $this;\n"
" }\n"
"\n"
" public function addBatch(int $workerNum, callable $func, bool $enableCoroutine = false): self\n"
" {\n"
" for ($i = 0; $i < $workerNum; $i++) {\n"
" $this->startFuncMap[] = [$func, $enableCoroutine];\n"
" }\n"
" return $this;\n"
" }\n"
"\n"
" public function start(): void\n"
" {\n"
" $this->pool = new Pool(count($this->startFuncMap), $this->ipcType, $this->msgQueueKey, false);\n"
"\n"
" $this->pool->on(Constant::EVENT_WORKER_START, function (Pool $pool, int $workerId) {\n"
" [$func, $enableCoroutine] = $this->startFuncMap[$workerId];\n"
" if ($enableCoroutine) {\n"
" run($func, $pool, $workerId);\n"
" } else {\n"
" $func($pool, $workerId);\n"
" }\n"
" });\n"
"\n"
" $this->pool->start();\n"
" }\n"
"\n"
" public function setIPCType(int $ipcType): self\n"
" {\n"
" $this->ipcType = $ipcType;\n"
" return $this;\n"
" }\n"
"\n"
" public function getIPCType(): int\n"
" {\n"
" return $this->ipcType;\n"
" }\n"
"\n"
" public function setMsgQueueKey(int $msgQueueKey): self\n"
" {\n"
" $this->msgQueueKey = $msgQueueKey;\n"
" return $this;\n"
" }\n"
"\n"
" public function getMsgQueueKey(): int\n"
" {\n"
" return $this->msgQueueKey;\n"
" }\n"
"}\n";

static const char* swoole_library_source_core_coroutine_functions =
"\n"
"/**\n"
Expand Down Expand Up @@ -6664,6 +6761,7 @@ static void php_swoole_load_library()
zend::eval(swoole_library_source_core_coroutine_fast_cgi_client, "@swoole-src/library/core/Coroutine/FastCGI/Client.php");
zend::eval(swoole_library_source_core_coroutine_fast_cgi_client_exception, "@swoole-src/library/core/Coroutine/FastCGI/Client/Exception.php");
zend::eval(swoole_library_source_core_coroutine_fast_cgi_proxy, "@swoole-src/library/core/Coroutine/FastCGI/Proxy.php");
zend::eval(swoole_library_source_core_process_process_manager, "@swoole-src/library/core/Process/ProcessManager.php");
zend::eval(swoole_library_source_core_coroutine_functions, "@swoole-src/library/core/Coroutine/functions.php");
zend::eval(swoole_library_source_ext_curl, "@swoole-src/library/ext/curl.php");
zend::eval(swoole_library_source_functions, "@swoole-src/library/functions.php");
Expand Down
4 changes: 2 additions & 2 deletions tests/swoole_runtime/stream_select/stream_set_blocking.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_runtime/stream_set_blocking
swoole_runtime/stream_select: swoole_runtime/stream_set_blocking
--SKIPIF--
<?php
require __DIR__ . '/../../include/skipif.inc';
Expand Down Expand Up @@ -48,4 +48,4 @@ unlink(__DIR__ . '/child.php');
--EXPECTF--
string(7) "0:test
"
string(2) "1:"
string(2) "1:"
2 changes: 2 additions & 0 deletions tools/build-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
'core/Coroutine/FastCGI/Client.php',
'core/Coroutine/FastCGI/Client/Exception.php',
'core/Coroutine/FastCGI/Proxy.php',
# <core for Process> #
'core/Process/ProcessManager.php',
# <core for functions> #
'core/Coroutine/functions.php',
# <ext> #
Expand Down

0 comments on commit 66f70f6

Please sign in to comment.