Discover Swoole’s Latest Features: Coroutine FTP/SSH, io_uring HTTP, and Key Bug Fixes
The update introduces coroutine support for FTP and SSH clients, adds io_uring‑based HTTP server capabilities, expands RemoteObject and PDO drivers, fixes critical bugs in HTTP2, process handling, and memory management, and includes performance optimizations and important compatibility notes.
New Features
Coroutine‑enabled FTP client can be activated at compile time with --enable-swoole-ftp, providing non‑blocking network operations.
Coroutine‑enabled SSH client is now available via --enable-swoole-ssh, improving concurrent efficiency.
HTTP server can use the high‑performance io_uring event mechanism; enable with --enable-uring_socket for better I/O.
New Swoole\RemoteObject\Server module offers transparent coroutine support for MongoDB.
Added Swoole\Coroutine::setTimeLimit() to limit coroutine execution time and prevent resource hogging.
Static file server now supports URL rewrite.
Coroutine support added for pdo_firebird.
PHP 8.5 compatibility added.
Coroutine version of gethostbyname function.
Improved Server::shutdown() implementation: in Process mode signals are replaced by pipe communication.
In HTTP request objects, a new server_addr field identifies the server’s IP address. Swoole\Coroutine::cancel now supports cancelling all iouring operations.
Bug Fixes
Fixed multiple releases of HTTP2 server sessions in multithreaded environments.
Resolved crashes in PHP 8.5 when child processes/threads fail to call refresh_memory_manager().
Fixed swoole_get_local_mac on macOS.
Addressed crashes caused by manually suspending coroutines in multithreaded contexts.
Corrected compilation errors on Alpine Linux.
Fixed memory leaks when hook functions fail.
Resolved thread‑safety issues in coroutine handling of pdo_sqlite and pdo_oci.
Adjusted sw_php_print_backtrace output to match PHP’s native format.
Fixed compile failures caused by enabling --enable-uring-socket, --enable-trace-log, or --enable-error-log simultaneously.
Fixed missing macro definitions that prevented pdo_firebird from compiling.
Optimizations
Running php --ri swoole now displays the libpq version.
Improved file‑coroutine logic for io_uring.
Added PHP stack traces when event addition fails.
Optimized implementations of swoole_get_local_ip and swoole_get_local_mac.
Reduced coroutine file‑lock wait times to avoid exponential back‑off.
Enhanced compatibility with the Android platform.
Important Notices
The --enable-openssl compile option has been removed; OpenSSL support is now enabled by default.
Enabling --enable-uring-socket requires also specifying either --enable-iouring or --with-liburing-dir.
Support for PHP 8.1 has been dropped. liburing now requires a minimum version of 2.8.
Note: Coroutine SSH and FTP clients cannot coexist with the native ext-ssh and ext-ftp extensions; the latter must be disabled to enable these features.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
