Releases: swoole/swoole-src
Releases Β· swoole/swoole-src
v4.5.5
New APIs
- Added Process\Manager and alias Process\ProcessManager (swoole/library@eac1ac5) (@matyhtf)
- Support HTTP2 server-side GOAWAY (#3710) (@doubaokun)
- Added Co\map() function (swoole/library#57) (@leocavalcante)
Enhancement
- Support http2 client unix socket (#3668) (@sy-records)
- Set the worker status to SW_WORKER_EXIT when the worker process exits (#3724) (@matyhtf)
- Add send_queued_bytes and recv_queued_bytes in Server::getClientInfo() (#3721) (#3731) (@matyhtf) (@Yurunsoft)
- Support option of stats_file (#3725) (@matyhtf) (@Yurunsoft)
Fixed
- Fixed PHP8 build (zend_compile_string change) (#3670) (@twose)
- Fixed PHP8 build (ext/sockets compatibility) (#3684) (@twose)
- Fixed PHP8 build (php_url_encode_hash_ex change) (#3713) (@remicollet)
- Fixed invalid conversion from 'const char*' to 'char*' for build (#3686) (@remicollet)
- Fixed HTTP2 client over HTTP proxy is not working (#3677) (@matyhtf) (@twose)
- Fixed PDO context data confusion (swoole/library#54) (@sy-records)
- Fixed onPacket callback or UDP Server with IPv6 return wrong port
- Fixed Lock::lockwait timeout setting does not take effect
v4.5.4
Backward compatibility Break
- Modify SWOOLE_HOOK_ALL to contain SWOOlE_HOOK_CURL (#3606) (@matyhtf)
- Remove ssl_method and Support ssl_protocols (#3639) (@Yurunsoft)
New APIs
- Added firstKey and lastKey (swoole/library#51) (@sy-records)
Enhancement
- Added open_websocket_ping_frame, open_websocket_pong_frame (#3600) (@Yurunsoft)
Fixed
- Fixed fseek ftell file larger than 2G bug (#3619) (@Yurunsoft)
- Fixed Socket barrier bug (#3627) (@matyhtf)
- Fixed http proxy handshake bug (#3630) (@matyhtf)
- Fixed a problem with parsing the HTTP header when send chunk data (#3633) (@matyhtf)
- Fixed zend_hash_clean assertion failure (#3634) (@twose)
- Fixed can't remove broken fd from event loop (#3650) (@matyhtf)
- Fixed crash when receiving invalid packet (#3653) (@matyhtf)
- Fixed array_key_last (swoole/library#46) (@sy-records)
Kernel
- Code optimization (#3615) (#3617) (#3622) (#3635) (#3640) (#3641) (#3642) (#3645) (#3658) (@matyhtf)
- Reduce unnecessary memory operation to improve write performance (#3620) (@matyhtf)
- Refactor aio (#3624) (@Yurunsoft)
- Added readlink/opendir/readdir/closedir hook (#3628) (@matyhtf)
- Improve swMutex_create, add SW_MUTEX_ROBUST (#3646) (@matyhtf)
v4.5.3
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
- Added usePipelineRead to support streaming call-in http2 client (#3354) (@twose)
- Do not create the file before receive body when a download (#3381) (@twose)
- Added
bind_address
andbind_port
setting for coroutine http client (#3390) (@huanghantao) - Added
lowercase_header
option for HttpClient (#3399) (@matyhtf) - Added
tcp_user_timeout
option forSwoole\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) - Support trailer for HTTP 1.1 (#3485) (@huanghantao)
- Support yield when sleeping less 1ms (#3487) (@Yurunsoft)
- Support get soft link file in the static handler (#3569) (@LeiZhang-Hunter)
- Close WebSocket connection immediately after the 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 WebSocket coredump, handle protocol status error (#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 MacOS (#3372) (@twose)
- Fixed MySQL test case (#3374) (@qiqizjl)
- Fixed PHP8 compatibility (#3384) (#3458) (#3578) (#3598) (@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 losing 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 useCoroutine\System
to create the child process (#3446) (@huanghantao) - Fixed sendwait not support SSL mode (#3459) (@huanghantao)
- Fixed
ArrayObject
andStringObject
bug (swoole/library#44) (@matyhtf) - Fixed mysqli error, typo (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 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 using 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 the connection status (#3534) (@matyhtf)
- Fixed don't need block signals in the process pool (#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)
- Fixed swoole_socket_coro accept bug when call setProtocol function will cause coredump (#3591) (@matyhtf)
Kernel
- 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()
andChannel::get_bytes()
(f001581) (@matyhtf) - Added 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)
v4.5.3RC1
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
- 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
andbind_port
setting for coroutine http client (#3390) (@huanghantao) - Added
lowercase_header
option for HttpClient (#3399) (@matyhtf) - Added
tcp_user_timeout
option forSwoole\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 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 useCoroutine\System
to create child process (#3446) (@huanghantao) - Fixed sendwait not support ssl mode (#3459) (@huanghantao)
- Fixed
ArrayObject
andStringObject
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
- 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()
andChannel::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)
v4.5.3-beta
update version
v4.5.3-alpha
feat: add http 1.1 trailer (#3485)
v4.5.2
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)
Fixed
- Fixed
Server->taskWait
on OSX (#3330) (@matyhtf) - Fixed MQTT protocol bug (8dbf506) (@guoxinhua) (2ae8eb3) (@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)
Kernel
v4.4.19
v4.5.1
Enhancement
- Support socket context bindto in hook (#3275) (#3278) (@CodingHuang)
- Support dns resolve in client::sendto (#3292) (@CodingHuang)
- Process->exit(0) will call os.exit directly (a732fe5) (@matyhtf)
- Support
log_date_format
to change format of log date,log_date_with_microseconds
to show micro-time in log (baf895b) (@matyhtf) - Support CURLOPT_CAINFO and CURLOPT_CAPATH (swoole/library#32) (@sy-records)
- Support CURLOPT_FORBID_REUSE (swoole/library#33) (@sy-records)
Fixed
- Fixed 32-bit build (#3276) (#3277) (@remicollet) (@twose)
- Fixed missing error info (#3280) (@CodingHuang)
- Fixed potential bugs in Table (d7b87b6) (@matyhtf)
- Fixed null ptr error in Server (defensive programming) (#3304) (#3305) (@twose)
- Fixed heartbeat timeout null ptr error (#3307) (@twose)
- Fixed mysqli options error (swoole/library#35) (@sy-records)
- Fixed response header parsing when there is no space after the colon in the response header (swoole/library#27) (@Yurunsoft)
Deprecated
- Mark Coroutine\System::(fread/fgets/fwrite) as deprecated, please use runtime hook instead (it should have been included in v4.5.0) (c7c9bb4) (@twose)
Kernel
v4.5.0
New APIs
- DTLS supports, we can build WebRTC applications now (#3188) (@matyhtf)
- Built-in
FastCGI
client, we can proxy HTTP request to FPM with one line of code now (swoole/library#17) (@twose) Co::wait
,Co::waitPid
,Co::waitSignal
(#3158) (@twose)Co::waitEvent
(#3197) (@twose)Co::set(['exit_condition' => $callable])
to exit condition of reactor (#2918) (#3012) (@twose)Co::getElapsed
to get the coroutine elapsed time (#3162) (@doubaokun)Socket::checkLiveness
,Socket::peek
(#3057) (@twose)Socket->setProtocol(['open_fastcgi_protocol' => $bool])
(#3103) (@twose)Server::get(Master|Manager|Worker)Pid
,Server::getWorkerId
(#2793) (#3019) (@matyhtf)Server::getWorkerStatus
(SWOOLE_WORKER_BUSY, SWOOLE_WORKER_IDLE) (#3225) (@matyhtf)Server->on('beforeReload', $callable)
andServer->on('afterReload', $callable)
(Server reload event on manager process) (#3130) (@huanghantao)Http\Server
supporthttp_index_files
andhttp_autoindex
with static handler (#3171) (@huanghantao)Http2\Client->read(float $timeout = -1)
, support Coroutine\HTTP2\Client read more than once (#3011) (#3117) (@twose)Http\Request->getContent
(alias of rawContent) (#3128) (@huanghantao)swoole_mime_type_(add|set|delete|get|exists)
(mime APIs) (#3134) (@twose)
Enhancement
- Optimize memory-copy between master and worker (4x faster) (#3075) (#3087) (@huanghantao)
- Optimize websocket dispatch (1x faster) (#3076) (@matyhtf)
- Optimize memory-copy in websocket_construct_frame (1x faster) (#3097) (@matyhtf)
- Optimize SSL validation (#3226) (@matyhtf)
- Separate SSL accept and SSL handshake (#3214) (@twose)
- Support MIPS (#3196) (@ekongyun)
- Resolve the domain name when use udp coroutine client (#3236) (#3239) (@huanghantao)
- Do not close stdout and stderr (show error logs after shutdown) (#3249) (@twose)
- Support some common options for Coroutine\Http\Server (#3257) (@twose)
- Support set cookies when websocket handshake (#3270) (#3272) (@twose)
- Support CURLOPT_FAILONERROR (swoole/library#20) (@sy-records)
- Support CURLOPT_FAILONERROR (swoole/library#20) (@sy-records)
- Support CURLOPT_SSLCERTTYPE, CURLOPT_SSLCERT, CURLOPT_SSLKEYTYPE, CURLOPT_SSLKEY (swoole/library#22) (@sy-records)
- Support CURLOPT_HTTPGET (swoole/library@d730bd08) (@shiguangqi)
Remove
Kernel
- New C++ API:
coroutine::async
with lambda (#3127) (@matyhtf) - Refactor event API and reactor fd to swSocket (#3030) (@matyhtf)
- Convert all source files to C++ (#3030) (71f987f) (@matyhtf)
- Code optimizations (#3063) (#3067) (#3115) (#3135) (#3138) (#3139) (#3151) (#3168) (@huanghantao)
- Code optimization for header files (#3051) (@matyhtf)
- Refactor
enable_reuse_port
option (#3192) (@matyhtf) - Reactor Socket API (#3193) (@matyhtf)
- Reduce one system call (3b5aa85) (@matyhtf)
- Remove swServerGS::now (#3152) (@huanghantao)
- Improve protocol setter (#3108) (@twose)
- Use the Better way to init C object on stack (#3069) (@twose)
- Use type
uchar
for bit field (#3071) (@twose) - Support parallel test (#3215) (@twose)