Latest PECL Releases:
- rdkafka 3.1.2
* Fix build - ahocorasick 0.0.7
Issue #21 fixed. Problem with buffering all previous searches in the trie. - swoole 4.4.0
Backward incompatible changes ---- Consistent with
PHPofficial, no longer supportsPHP7.0(@matyhtf) - Remove the
Serializemodule, which is maintained in a separate ext-serialize extension. Reason: Due to frequent changes to thePHPkernel, stability cannot be guaranteed - Remove the
PostgreSQLmodule and maintain it in a separate ext-postgresql extension. Reason:PostgreSQLuses asynchronous ways in the kernel and lacks the necessary unit tests to guarantee quality -
Runtime::enableCoroutineis 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
CoroutineMySQLclient driver, the underlying design is more standardized, but there are some small downward incompatible changes-
CoroutineMySQL->fetch/nextResultis optimized for on-demand reads, which will trigger IO scheduling - When the
deferattribute is on, the request ofstatementneeds to usestatement->recvto receive the response - When the
defer/fetch_modefeature is enabled, if there is unreceived data, a new request will be banned - Unlike asynchronous, the
connectedattribute is no longer updated based on events in real-time (It's not reliable) but is updated after theIOoperation fails
-
-
CoroutineHttpClient->set_cookie_headersno longer have key names (#2664) (@twose)
Deprecated content
- The
Buffermodule will be discarded. Reason: It is highly replaceable and has low usage. It can be replaced byPHPstring orfopen("memory") - The
Lockmodule will be discarded. Reason for discarding: There may be problems with locking in the Coroutine. You can useChanto implement the Lock of the Coroutine version - Since async
stream_socket_pairis introduced, it is recommended to enable the hook by flagSWOOLE_HOOK_STREAM_FUNCTIONinstead ofSWOOLE_HOOK_STREAM_SELECT
New features
- Added Library, using pure
PHPto write kernel functions instead ofC/C++, providing the following features- Added high quality
PHPmoduleCoroutineWaitGroup(@twose) - Use the
PHPcode to implement the CURL hook, one-click to make the CURL non-blocking, currently the experimental feature, you need to callRuntime::enableCoroutine(SWOOLE_HOOK_CURL)to open (@matyhtf) (@Yurunsoft) - Use
PHPcode to implementexec/shell_execof Coroutine version (#2657) (@Yurunsof) - When
RuntimeHookis turned on, the functionarray_walk,array_walk_recursivewill be replaced by the version of Swoole, which will solve the problem that the native function cannot be reentrant, but it will not be able to traverse object (@matyhtf) (@twose)
- Added high quality
- Added a new Coroutine Preemptive Scheduler to prevent the Coroutine from taking too long CPU time to cause other Coroutine to starve. Open the
swoole.enable_preemptive_scheduler = Onbyphp.ini. For details, see preemptive_scheduler (@shiguangqi) - Added
Timer::list()to getTimerIterator, which can traverse all timers,TimerclearAllclears all timers,Timerinfo(int $id)gets timer information,Timer::stats()gets the global timer status (#2498) (@twose) - Added two methods
getOptionandsetOptionforCoroutineSocket(9d13c29) (@matyhtf) - Added
$master_pidproperty andshutdownmethod toProcessPool(a1d6eaa) (@matyhtf) - Added the 4th parameter of the constructor of
ProcessPool, when true, the underlying layer will automatically create the Coroutine in theonWorkerStartcallback (8ceb32cd) (@matyhtf) - Support non-blocking
stream_socket_pairin Runtime hook (#2546) (@matyhtf) - Added
static_handler_locationssetting ofHttpServerto set static file path (@matyhtf) - Added
CoroutineHttpClient->setBasciAuthmethod to automatically sendAuthorizationheader (#2542) (@hongbshi) - Added
CoroutineHttp2Client->pingmethod (40041f6) (@shiguangqi) - Added
task_use_object(#2659) (aa01317) (@twose)
Enhancement
- New
CoroutineMySQLClientdriver (#2538) (@twose)- The underlying programming mode using
C++and Coroutine (sync writing, async performance) - Support SSL connection (configure
['ssl' => true]when connect) - Support request with large data (unlimited)
- Support response with large data (unlimited)
- Support
fetchto read by line (nowfetchis read on demand, data without fetch does not consume user memory) (#2106) - Support
nextResultread on demand (ibid) - Optimized protocol parser
-
daterelated type decimal precision support - Error code and information are consistent with
PDO/mysqli
- The underlying programming mode using
-
CoroutineRediscompatibility mode, enabled by$redis->set(['compatibility_mode' => true]), which can make the result ofhmGet/hGetAll/zRange/zRevRange/zRangeByScore/zRevRangeByScoreconsistent with phpredis (#2529) (@caohao-php) - Now
100KCoroutine are allowed to exist at the same time by default (c69d320b) (@twose) - Support
bailout(can exit the process correctly when a fatal error occurs in the Coroutine) (#2579) (@twose) -
Servercan display a friendly400/404/503when error occurred (@matyhtf) (f3f2be9d) -
Serverenablereload_asyncandsend_yieldby default (#2555) (9d4a4c47) (@matyhtf) -
Server->onFinishcallback is in Coroutine (@twose) -
CoroutineHttpClientenablewebsocket_maskby default (c02f4f85) (@twose) - Scheduling operation of
Channeloutside the Coroutine is no longer allowed (519b6043) (@twose) -
WebSocketServerwill close the connection when the handshake fails (#2510) (@twose) - Under the
Linux, the dead parent process will automatically send a signal to kill the child process (4b833a3d) (@matyhtf) - Memory optimization of
Socket->recv(642a3552) (@twose) - Floating point calculation optimization (#2572) (@tangl163)
- All built-in classes prohibit cloning/serializing/unseting-declared-properties (f9c974b8) (@twose)
-
Server->bindwill generate a warning and return false whenuidis more thanUINT32_MAX - Support
PHP7.4(#2506) (@twose)
Fixed
- Fixed
getProcessofProcessPool(#2522) (@matyhtf) - Fixed a bug that exceptions were ignored in some special cases (@twose)
- Fixed memory leak by timer after
forkprocess (8f3abee7) (@twose) - Fixed timezone on non-Linux systems (#2584) (@devnexen)
- Fixed
enable_coroutine=false+task_enable_coroutine=true(#2585) (@matyhtf) - Fixed Http2's trailer method can not output a empty value header (#2578) (@twose)
- Fixed
CoroutineHttpClient->setCookiesmemory error in special cases (#2644) (@Yurunsoft) - Fixed #2639 (#2656) (@mabu233)
- Fixed
arginfo_swoole_process_pool_getProcess(#2658) (@mabu233) - Fixed
static_handlerdoes not support soft links (@matyhtf) - Fixed a bug (I don't know how to describe it) (22504dd4) (@matyhtf)
- Fixed
Server->getClientInfoerror (#2639) (@matyhtf) - Fixed an illegal operation of the same Socket with multiple Coroutine operations (#2661) (@twose)
- Fixed swoole_table iterator coredump (#2663) (@mabu233)
Coroutine scheduler ?
- Added
SwooleCoroutineSchedulerclass as the entry for thecliscript, replacinggo() + SwooleEvent::wait() - Added
SwooleCoroutineRunfunction to provide wrapper forSwooleCoroutineScheduler
-
go() + SwooleEvent::wait()may be deprecated
Internal
- Continuous underlying code quality optimization work (@swoole)
- More unit tests, and use the assertion library swoole/assert based on webmozart/assert secondary development (@twose)
- Completely abolish the
Windowssupport plan -
CoroutineHttp2Clientrefactor (f64874c3) (@matyhtf) - The faster callback function caller (@twose)
Experimental content
- May add
CoroutineServerandCoroutineHttpServerin5.0
- Consistent with
- solr 2.5.0
- Atomic Updates (partials) - Simple Optimistic Concurrency - Compatibility with PHP 7.1, 7.2, 7.3, latest 7.4 - Enable gzip encoding if server supports it - Fix Real Time Get requests fails if it wasn't the first request - Fix addQueryField return wrong query - Fix Solr Extension build fail with curl 7.19+ - gRPC 1.22.0
- gRPC C Core 1.22 update - rdkafka 3.1.1
* Expose query watermark offsets (#219, @gytislakavicius) * Support sending timestamp (epoch ms) in producev (#228, @lkm) * Fix KafkaTopic::producev causing segfault on librdkafka 1.0.0 (#222, @Steveb-p) * Fix version parsing (#224, @dariuskasiulevicius) - datadog_trace 0.29.0
### Fixed - Edge case where the extension version and userland version can get out of sync #488Changed
- Prefix hostnames as service names with
host-to ensure compatibility with the Agent #490
- Prefix hostnames as service names with




