Swoole 各大版本移除的特性

Eddy 2019-12-12 15:08:04

Swoolo 4.4

Backward incompatible changes

  • Consistent with PHP official, no longer supports PHP7.0 (@matyhtf)

  • Remove the Serialize module, which is maintained in a separate ext-serialize extension. Reason: Due to frequent changes to the PHP kernel, stability cannot be guaranteed

  • Remove the PostgreSQL module and maintain it in a separate ext-postgresql extension. Reason: PostgreSQL uses asynchronous ways in the kernel and lacks the necessary unit tests to guarantee quality

  • Runtime::enableCoroutine is no longer automatically compatible with the internal and external environment of the Coroutine. Once enabled, all blocking operations must be called in the Coroutine (@matyhtf)

  • Due to the introduction of the new Coroutine\MySQL client driver, the underlying design is more standardized, but there are some small downward incompatible changes

  • Coroutine\MySQL->fetch/nextResult is optimized for on-demand reads, which will trigger IO scheduling

  • When the defer attribute is on, the request of statement needs to use statement->recv to receive the response

  • When the defer/fetch_mode feature is enabled, if there is unreceived data, a new request will be banned

  • Unlike asynchronous, the connected attribute is no longer updated based on events in real-time (It's not reliable) but is updated after the IO operation fails

  • Coroutine\Http\Client->set_cookie_headers no longer have key names (#2664) (@twose)

移除 Serialize 模块,单独在 ext-serialize 扩展中维护

移除 PostgreSQL 模块,单独在 ext-postgresql 扩展中维护

说明:最低PHP版本要求 php 7.1

Swoolo 4.3

  • Websocket\Server->exists only shows if the connection exists. Please use the isEstablished method to get if it is a Websocket client.

  • Remove the swoole.fast_serialize configuration item

  • Removed the PHP Warning when the Co\Client method return failed

  • Remove the Server->gzip method

  • Remove PicoHttpParser support

  • Remove async modules

Remove all async modules, separate asynchronous extensions to async-ext:

  • Async functions

  • MySQL

  • Redis

  • Http\Client

  • Memory\Pool

  • MsgQueue

  • RingQueue

移除 PicoHttpParser 支持

移除所有异步模块,单独在扩展中维护

注意:从4.3版本开始,很多原来内置的函数或是类都不能用了,需要单独安装对应的扩展。

Swoole 2.0.12

最小 PHP 版本要求为 php 7.0

Swoole 2.0.5

最小 PHP 版本要求为 php 5.5


详细的版本更新记录可以这里查看。

本文来源于 Eddy

免责声明:
1. 本文版权归属原作所有,仅代表作者本人观点,不代表币推儿的观点或立场。
2. 如发现文章、图片等侵权行为,侵权责任将由作者本人承担。