Swoole PHP 4.5.4 released

Swoole v4.5.4 is released with multiple new features and enhancement.

The major change included in this version is:

SWOOLE_HOOK_ALL starts including SWOOLE_HOOK_CURL by default

When you enable SWOOLE_HOOK_ALL, CURL HOOK is also enabled. Please check more about Swoole HOOK.

SSL settings changes

For SSL protocols, ssl_method option is removed from server/client SSL settings.

ssl_protocols is added as a new SSL setting, by default all the protocols are supported:

SWOOLE_SSL_TLSv1
SWOOLE_SSL_TLSv1_1
SWOOLE_SSL_TLSv1_2
SWOOLE_SSL_TLSv1_3
SWOOLE_SSL_SSLv2
SWOOLE_SSL_SSLv3

Websocket ping frames support

open_websocket_ping_frame and open_websocket_pong_frame options are supported by websocket server since v4.5.4.

They are disabled by default, but you can enable these two options when you like to manage and send or receive the ping pong frames in your application.

Construct a ping frame:

<?php
$ping = new Swoole\Websocket\Frame;
$ping->opcode = WEBSOCKET_OPCODE_PING;
$ping->data = 'ping';

List of changes in 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)

You can upgrade to Swoole v4.5.4 now:

pecl install swoole