OpenSwoole 26.2.0 is a major release with PHP 8.5 support, native PHP Fiber coroutine context, io_uring reactor backend, Xdebug step debugging inside coroutines, event loop lag metrics and more.
Official OpenSwoole version 26.2.0You can upgrade to OpenSwoole v26.2.0 now:
pecl install openswoole-26.2.0
Or use Docker images:
docker pull openswoole/openswoole:26.2-php8.5-alpine
Find more OpenSwoole docker images at OpenSwoole Docker images at Docker Hub
OpenSwoole 26.2.0 is fully compatible with PHP 8.5, including new features like the Pipe Operator, URI extension, Clone With and more.
A new coroutine context backend using PHP's native zend_fiber API instead of Boost ASM or ucontext. This enables proper integration with Xdebug, profilers, and fiber-aware extensions. See the Fiber Context documentation for examples. Configure at runtime:
Co::set(['use_fiber_context' => true]);
Or via INI: openswoole.use_fiber_context=On
Xdebug step debugging now works correctly inside coroutines when fiber context is enabled. The legacy "extremely dangerous" warning has been removed.
Select the event reactor backend at runtime. See the Reactor Type documentation for details and examples.
Co::set(['reactor_type' => OPENSWOOLE_IO_URING]);
New constants: OPENSWOOLE_EPOLL, OPENSWOOLE_KQUEUE, OPENSWOOLE_POLL, OPENSWOOLE_SELECT, OPENSWOOLE_IO_URING
A new event reactor using Linux io_uring with IORING_OP_POLL_ADD as a drop-in replacement for epoll. Enable with --enable-io-uring (requires liburing). Supports multishot poll on kernel 5.13+ with automatic fallback on older kernels. See the io_uring documentation for setup and examples.
Dedicated io_uring ring for asynchronous file operations (open, read, write, fstat, fsync, unlink, rename, mkdir, rmdir), replacing the thread pool. Unsupported operations gracefully fall back to the thread pool. See the io_uring Async File I/O documentation for examples.
Real-time event loop lag monitoring via $server->stats(). Exposes event_loop_lag_ms, event_loop_lag_max_ms, and event_loop_lag_avg_ms per worker, task worker (when coroutine-enabled), and reactor thread (process mode). Useful for detecting blocking operations that stall the event loop. See the Event Loop Lag Metrics documentation for monitoring and alerting examples.
On PHP 8.4+, exit() calls inside coroutines are intercepted and throw openswoole_exit_exception instead, preventing the entire process from terminating. See the Coroutine-safe exit() documentation for examples.
Replaces the custom openswoole_http_parser with llhttp parser for improved standards compliance and performance.
OSW_FUNCTION_ALIAS caused global functions to appear as class methods with corrupted return types in Reflection. Replaced with proper PHP_FE/PHP_FALIAS entriesPOLL_ADDLOCK_NB) now properly checks in-process coroutine lock state before the system flock() call_GNU_SOURCE define before sched.h_GNU_SOURCE define before linux/futex.hopenswoole_*If you need to install OpenSwoole or look at other update methods, checkout the installation documentation and how to update Open Swoole.
Install the core library:
composer require openswoole/core:26.2.0
Join 4,000+ others and never miss out on new tips, tutorials, and more.