# 26.11.1

## New Features

 . HTTP QUERY method (RFC 10008); form bodies are parsed into $request->post like POST, PUT, PATCH and DELETE (#414)
 . CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR in the native curl hook; with open_basedir set, values with "file" or "all" are refused (#412)
 . Bundled llhttp upgraded to 9.4.4 (#413)
 . Bundled nghttp2 HPACK code upgraded to 1.71.0
 . Bundled hiredis upgraded to 1.5.1

## Changes

 . The HTTP parser is stricter: a space before a header colon, folded header lines and raw bytes above 0x7F in the request target get 400 Bad Request, in the server and the Coroutine HTTP client
 . The WebSocket server follows RFC 6455: unmasked client frames, unknown opcodes and a new message sent before a fragmented one is finished close the connection; ping, pong and close frames accept payloads up to 125 bytes
 . A Coroutine\Http\Client with websocket_mask set to false can no longer send to an OpenSwoole WebSocket server, which now requires masked client frames
 . The HTTP/2 server rejects frames on a stream the client has closed, removes the padding of DATA frames, checks WINDOW_UPDATE increments, and with send_yield waits for the stream window
 . The HTTP/2 server and client reject header blocks with invalid Huffman padding, as RFC 7541 requires
 . SOCKS5 proxy target hosts, usernames and passwords longer than 255 bytes are refused, and a refused CONNECT reply fails the connection

## Bug Fixes

 . Fix WebSocket frames losing their opcode and FIN flag with several reactor threads in SWOOLE_PROCESS mode
 . Fix WebSocket connections when the upgrade request is followed by more data in the same packet
 . Fix a fragmented WebSocket message with an empty first frame losing its opcode
 . Fix the payload of WebSocket ping and pong frames sent with the 16 bit length form
 . Fix multipart form data of an unfinished part being kept for the next request, and its temporary file and memory not being released
 . Fix Request::create()->parse() with a multipart body
 . Fix Response::create() with a Coroutine\Socket
 . Fix chunked requests with Content-Length: 0 that do not end with a zero length chunk
 . Fix client certificates larger than the read buffer with ssl_client_cert_file
 . Fix DTLS connections above max_connection
 . Fix HTTP/2 GOAWAY frames carrying the error code in the flags
 . Fix buffer_high_watermark and buffer_low_watermark being reset when the server starts
 . Fix the $row argument of the PostgreSQL statement fetch methods being ignored
 . Fix a Lock becoming unusable in other processes after a child process exits
 . Fix a Table losing rows with concurrent writers after a child process exits
 . Fix Lock::lockwait() requiring an argument
 . Fix the open_redis_protocol parser with null bulk strings, integer elements and empty arrays
 . Fix the length protocol with unsigned 32 bit lengths of 2^31 and more
 . Fix the SOCKS5 handshake with short replies and IPv4 targets
 . Fix Coroutine\Client::peek() with a length of 0 or less
 . Fix curl_setopt_array() not stopping at a refused option in the native curl hook
 . Fix HTTP/2 response header blocks larger than the header buffer
 . Fix HTTP/2 send_yield responses not ending when a send fails or the client resets the stream or closes the connection
 . Fix discarded HTTP/2 DATA frames not counting against the connection window
 . Fix the WebSocket fragment buffer not being released when a connection closes during a fragmented message
 . Fix Lock::destroy() in another process making the lock unusable for the process that created it
 . Fix the open_redis_protocol parser accepting bulk lengths below -1

# 26.11.0

## New Features

 . PHP 8.6 support
 . CURLOPT_SEEKFUNCTION support in the native curl hook on PHP 8.6
 . CURLOPT_PREREQFUNCTION support in the native curl hook on PHP 8.4+ (Guzzle 7.12+)
 . PIE (PHP Installer for Extensions) support
 . Response::cookie() also sends Max-Age when an expiry time is set, like setcookie() (#310)

## Changes

 . Hooked ssl:// and tls:// client streams use the same peer verification defaults as native PHP; set verify_peer to false to connect to servers with a self-signed certificate
 . Cookie values are encoded and decoded like PHP does: a "+" is kept and a space is %20, in the server and the HTTP clients; cookies with spaces set by earlier versions read back with "+" until they are set again; for a cookie name sent twice, the first value is used (#311)
 . OpenSwoole 27.2 will require PHP 8.4 or later; 26.11 is the last release series to support PHP 8.3

## Bug Fixes

 . Fix stream_socket_enable_crypto with tls (#401)
 . Fix io_uring build on Alpine Linux (#400)
 . Fix SSL client certificate lost in getClientInfo() when the worker pid is greater than 65535
 . Fix curl_copy_handle() not keeping the CURLOPT_STDERR stream and callback data in the native curl hook
 . Fix preemptive scheduler crash on ZTS builds
 . Fix crash in the native curl hook when a curl multi handle is released after the event loop is destroyed
 . Fix enable_reuse_port having no effect on Linux because SO_REUSEPORT was not detected at configure time
 . Fix the http2_* server settings being ignored and not sent to clients in the SETTINGS frame
 . Fix max_idle_time closing active connections and ignoring fractions of a second
 . Fix a crash when a coroutine is canceled during file I/O
 . Fix stream_select() closing regular files
 . Fix closing a unix datagram socket removing the peer's socket file
 . Fix process pipes never being closed
 . Fix Lock::lockwait() truncating the timeout
 . Fix process pool reload stalling, getProcess() ids and a connection leak
 . Fix process pool warnings about workers that already exited or detached
 . Fix the signal listener count with wait_signal
 . Fix a second Coroutine\System::waitSignal() on the same signal leaving the first waiting forever
 . Fix Coroutine::select() with push channels and array keys
 . Fix Table keys longer than 63 bytes, iteration with an empty key, and incr()/decr() on a bad column
 . Fix the Table row lock being taken over from a live holder
 . Fix an HTTP/2 RST_STREAM leaving a send_yield coroutine waiting forever
 . Fix the open_redis_protocol parser failing on commands split across reads and on pipelined commands
 . Fix hooked time_nanosleep() accepting nanoseconds out of range
 . Fix a crash in the native curl hook with curl_copy_handle() or connection reuse in curl_multi
 . Fix curl_reset() losing the coroutine state of a native curl handle
 . Fix co::run() not returning for minutes after curl_multi requests in the native curl hook
 . Fix io_uring warnings logged on every file operation when io_uring is not available, for example in Docker containers with the default seccomp profile
 . Fix the server master process being killed by SIGALRM when a timer was created before Server::start()
 . Fix the static handler sending the file body for HEAD requests
 . Fix the HTTP/2 client reply to PING frames and its handling of GOAWAY and padded frames
 . Fix CurlHandle objects never being freed with CURLOPT_HEADERFUNCTION in the native curl hook on PHP 8.4+ (#391)
 . Fix HTTP/2 server responses to HEAD requests sending a body
 . Fix bundled hiredis symbols colliding with other extensions that link hiredis (#394)
 . Fix the build on FreeBSD 14 and 15 (#389)
 . Fix OpenSwoole\Table ignoring a conflictProportion below 1 (#362)
 . Fix the io_uring reactor failing to start when io_uring is not available; it now falls back to epoll, and reactor_type is accepted by Server::set() (#408)
 . Fix HTTP/2 requests with headers split into CONTINUATION frames, and HPACK errors when http2_header_table_size is set (#388)
 . Fix heap corruption when closing a mysqli connection opened with mysqli_init() and real_connect() in a coroutine (#409, #378)
 . Fix max_request_execution_time ending later requests early and crashing workers (#315, #358)
 . Fix coroutines crashing when opcache.preload is enabled (#343)
 . Fix the deprecation warning for on('handshake') (#303)
 . Fix configure not finding libpq in lib64 without pg_config (#245)
 . Fix task workers logging a warning for SIGPIPE
 . Fix Xdebug not seeing the request callback with use_fiber_context, which crashed the worker when variables were inspected (#404)
 . Fix the io_uring reactor not answering requests in SWOOLE_PROCESS mode (#405)
 . Fix the io_uring reactor on kernels before 5.13, where multishot poll is not available
 . Various stability fixes

# 26.2.0

## New Features

 . PHP 8.5 support
 . PHP native Fiber context backend for coroutines: new coroutine context backend using PHP's native zend_fiber API instead of Boost ASM or ucontext. Enables proper integration with xdebug, profilers, and fiber-aware extensions. Configurable at runtime via `Co::set(['use_fiber_context' => true])` or INI `openswoole.use_fiber_context=On`
 . Xdebug support: xdebug step debugging now works correctly inside coroutines when fiber context is enabled. Removed the legacy "extremely dangerous" warning
 . Runtime reactor type selection: select the event reactor backend at runtime via `Co::set(['reactor_type' => OPENSWOOLE_IO_URING])`. New constants: OPENSWOOLE_EPOLL, OPENSWOOLE_KQUEUE, OPENSWOOLE_POLL, OPENSWOOLE_SELECT, OPENSWOOLE_IO_URING
 . io_uring reactor backend: 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
 . io_uring async file I/O engine: 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
 . Event loop lag metrics: 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
 . Coroutine-safe exit() support: intercepts exit() calls inside coroutines on PHP 8.4+ (where exit changed from opcode to function) and throws openswoole_exit_exception instead
 . Backward compatibility constant aliases
 . Migrate HTTP parser to llhttp: replaces the custom openswoole_http_parser with llhttp parser for improved standards compliance and performance

## Bug Fixes

 . Fix reflection issues and scope leaks (#284): OSW_FUNCTION_ALIAS caused global functions to appear as class methods with corrupted return types in Reflection. Replaced with proper PHP_FE/PHP_FALIAS entries
 . Fix file I/O hanging under io_uring: race condition where eventfd notification could be lost between draining and re-arming single-shot POLL_ADD. Added reactor end-of-loop callback and timeout CQE filtering
 . Fix file lock bug: non-blocking flock (LOCK_NB) now properly checks in-process coroutine lock state before the system flock() call
 . Fix CPU affinity compile check: add missing _GNU_SOURCE define before sched.h
 . Fix futex compile check: add missing _GNU_SOURCE define before linux/futex.h

## Refactoring

 . Namespace normalization: openswoole_*, updated internal references and test directories
 . Removed compile-time guards from reactor type PHP constants; runtime validation handles unsupported backends
 . Removed PHP < 8.0 compatibility code
 . Dropped PHP 8.2 support

#

 . Fix postgres client bugs @mrVrAlex


# 22.0.0

 . Rename `co\run` to be `co::run`
 . Security update: Remove embedded PHP codes, hot code execution with eval and remove `ini` option `enable_library`
 . Added server Constants class: OpenSwoole\Constant
 . Use \OpenSwoole as the main namespace, although \Swoole is still supported
 . Pre-check server options
 . Security update: New server option `enable_server_token`, disabled by default
 . Built-in Psr7 API support added
 . Boost ASM library upgrade
 . New Psr API: $server->setHandler(\Psr\Http\Server\RequestHandlerInterface $handler)
 . New Psr API: $server->handle(callable $callback)
 . Redis Server API: $server->setHandler() -> $server->addCommand()
 . Redis Server API: $server->getHandler() -> $server->getCommand()
 . Disable sockets_*, exec, shell_exec, `gethostbyname` coroutines hook by default, remove HOOK_BLOCKING_FUNCTION and HOOK_SOCKETS in HOOK_ALL; Enable them explicitly if they are used
 . Remove deprecated custom coroutine MySQL client, prefer the hooked native coroutine MySQL client
 . Remove deprecated custom coroutine Redis client, prefer the hooked native coroutine Redis client
 . Remove deprecated experimental coroutine HTTP server
 . Remove deprecated experimental Redis protocol server
 . Remove deprecated function `swoole_timer_set()` and `Timer->set()`
 . Remove deprecated function `swoole_event_rshutdown`
 . Remove deprecated function `Swoole\Runtime::fread`, `Swoole\Runtime::fwrite`, `Swoole\Runtime::fgets`
 . Remove deprecated function `Coroutine::suspend`, use `Coroutine::yield`
 . Remove deprecated function `Coroutine::getuid`, use `Coroutine::getCid`
 . Remove deprecated function `Coroutine::listCoroutines`, use `Coroutine::list`
 . Remove deprecated function `Table::exist`, use `Table::exists`
 . Remove deprecated function `Table::delete`, use `Table::del`
 . Remove deprecated function `Server->connection_info()`, use `Server->getClientInfo()`
 . Remove deprecated function `Server->connection_list()`, use `Server->getClientList()`
 . Remove deprecated function `Server->exist`, use `Server->exists`
 . Move global constants under namespace: SWOOLE_CHANNEL_OK -> `OpenSwoole\Coroutine\Channel::CHANNEL_OK`, SWOOLE_CHANNEL_TIMEOUT -> `OpenSwoole\Coroutine\Channel::CHANNEL_TIMEOUT`, SWOOLE_CHANNEL_CLOSED -> `OpenSwoole\Coroutine\Channel::CHANNEL_CLOSED`...
 . Move global constants under namespace: SWOOLE_DEFAULT_MAX_CORO_NUM -> `OpenSwoole\Coroutine::DEFAULT_MAX_CORO_NUM`...
 . Remove `$server->getLastError()`, use `OpenSwoole\Util::getLastErrorCode()`
 . Remove `$process->name()`, use `OpenSwoole\Util::setProcessName()`
 . New Util API class: added `OpenSwoole\Util` class
 . Remove option `swoole.use_shortname`, remove `Co\*` alias. `go`, `chan`, `defer`, `co::*` are available by default
 . Remove `swoole_async_dns_lookup_coro`, use `OpenSwoole\Coroutine::dnsLookup` or `OpenSwoole\Coroutine\System::dnsLookup`; remove `swoole_async_set`, use `OpenSwoole\Until::setAio([])` or `$server->set([])` for `aio` options;
 . Rename PHP `ini` options from `swoole.*` to be `openswoole.*`
 . Remove `swoole_clear_dns_cache`, use OpenSwoole\Coroutine::clearDNSCache` or `OpenSwoole\Coroutine\System::clearDNSCache`
 . Remove custom unserialize functions: `swoole_substr_unserialize` and `swoole_substr_unserialize`
 . Remove `swoole_client_select` and `swoole_select`, use `OpenSwoole\Client::select`
 . Remove `swoole_last_error`, use `OpenSwoole\Util::getLastErrorCode`
 . `OpenSwoole\Event::wait();` should be added explicitly to wait for all the IO events
 . Use `\OpenSwoole\Server::SIMPLE_MODE` and `\OpenSwoole\Server::POOL_MODE` at server structure config
 . Fix: ignore user set illegal HTTP header at server
 . Fix: ignore user set encoding header at client if it is not supported
 . Remove hard requirements and links of json and remove compile flag `--enable-swoole-json`
 . Rename compile flag `--enable-swoole-curl` to be `--enable-hook-curl`
 . Fix convert double sec to long microseconds in hooked usleep by @shandyDev

# 4.12.1

 . Bug fixed: PDO pool client for Postgres
 . Compatible with PHP 8.2.0 (PHP-8.2.0)

# 4.12.0

 . New server option: `enable_server_token`, disable by default
 . Compatible with PHP 8.2 latest changes (PHP-8.2-RC3)
 . Fix: ignore user set encoding if it is not supported
 . Fix: Remove illegal http header
 . Fix convert double sec to long microseconds in hooked usleep by @shandyDev

# 4.11.1

 . Fix postgres client metaData api bugs
 . Fix cookie parsing bug causing cookie errors
 . Fix memory leak in swoole_stream_select
 . Fix compatible issues with old libcurl on centos 7
 . Fix compatible issues for PHP 8.0 and Fedora, Centos 7

# 4.11.0

 . HTTP2 server: allow HTTP2 client and server to set custom HTTP2 settings: http2_header_table_size, http2_initial_window_size, http2_max_concurrent_streams, http2_max_frame_size, http2_max_header_list_size
 . Support static compile
 . New feature: support http_index_files at HTTP2 server
 . CI: Remove PHP7.2/7.3 support as they are not supported by the PHP team
 . Bug fixed: Fix HTTP2 client and respect max_concurrent_streams settings
 . HTTP2: Update HTTP2 default max concurrent streams per connection to be 1280
 . Bug fixed: Respect server side settings at HTTP2 client
 . Optimize signal-driven timer code (@hauptmedia)
 . Bug fixed: $server->getWorkerPid does not return the correct worker pid when being called from another worker context
 . Bug fixed: init window size in http2 server
 . Deprecated: redis server
 . Bug fixed: close HTTP2 connection when there are errors
 . Close connection when a process is stopped and it is managing http2 sessions 
 . Bug fixed: fix user land timer is not stopping when the server is shutting down 
 . Postgres client: return empty array if the result set is empty
 . Postgres client: provide constant enums for $connection->resultStatus
 . Postgres client: added new API $pg->reset() and $pg->status() (@RedChops)
 . CI and tests: fixed many bugs in tests and improved the CI and testing (@hauptmedia)
 . Build fix for gcc < 4.9 (@dmz-uk)