Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
project(libswoole)

enable_language(ASM)
set(SWOOLE_VERSION 6.2.2)
set(SWOOLE_VERSION 6.2.3)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
27 changes: 24 additions & 3 deletions ext-src/php_swoole_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -7873,7 +7873,25 @@ static const char* swoole_library_source_core_remote_object_client =
" $headers['x-api-key'] = $options['api_key'];\n"
" }\n"
" $this->client->setHeaders($headers);\n"
" self::$clients[$this->id] = $this;\n"
"\n"
" // RemoteObject::__unserialize() looks the client up here by id to re-bind remote objects the server returns.\n"
" self::$clients[$this->id] = \\WeakReference::create($this);\n"
" }\n"
"\n"
" public function __destruct()\n"
" {\n"
" // self::$clients only holds a weak reference, so its entry would outlive the client. Drop it here, but only\n"
" // if it is this instance's own: one built without the constructor has no entry.\n"
" if ((self::$clients[$this->id] ?? null)?->get() === $this) {\n"
" unset(self::$clients[$this->id]);\n"
" }\n"
" }\n"
"\n"
" /**\n"
" * A clone would share the id, the registry entry and the HTTP connection of the client it was made from.\n"
" */\n"
" private function __clone()\n"
" {\n"
" }\n"
"\n"
" public function create(string $class, mixed ...$args): RemoteObject\n"
Expand All @@ -7894,10 +7912,13 @@ static const char* swoole_library_source_core_remote_object_client =
" if (empty($clientId)) {\n"
" throw new Exception('RemoteObject is not bound to a client');\n"
" }\n"
" if (!isset(self::$clients[$clientId])) {\n"
" $client = (self::$clients[$clientId] ?? null)?->get();\n"
" if ($client === null) {\n"
" // Drop a dead reference if one is ever found.\n"
" unset(self::$clients[$clientId]);\n"
" return null;\n"
" }\n"
" return self::$clients[$clientId];\n"
" return $client instanceof static ? $client : null;\n"
" }\n"
"\n"
" public function getId(): string\n"
Expand Down
6 changes: 3 additions & 3 deletions include/swoole_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

#define SWOOLE_MAJOR_VERSION 6
#define SWOOLE_MINOR_VERSION 2
#define SWOOLE_RELEASE_VERSION 2
#define SWOOLE_RELEASE_VERSION 3
#define SWOOLE_EXTRA_VERSION ""
#define SWOOLE_VERSION "6.2.2"
#define SWOOLE_VERSION_ID 60202
#define SWOOLE_VERSION "6.2.3"
#define SWOOLE_VERSION_ID 60203
#define SWOOLE_API_VERSION_ID 0x202208a

#define SWOOLE_BUG_REPORT \
Expand Down
39 changes: 30 additions & 9 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
<email>doubaokun@php.net</email>
<active>yes</active>
</developer>
<date>2026-07-08</date>
<time>22:00:00</time>
<date>2026-09-22</date>
<time>16:00:00</time>
<version>
<release>6.2.2</release>
<release>6.2.3</release>
<api>6.0</api>
</version>
<stability>
Expand All @@ -61,12 +61,20 @@
</stability>
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license>
<notes>
- Refactored the communication between multi-thread pools from `Pipe` to `Unix Socket` to enhance the reliability of high-concurrency transmission for asynchronous file operations.
- Resolved sporadic segmentation faults when `Worker` parses `HTTP` parameters, eliminating the risk of process crashes.
- Fixed a fatal `Error::__toString` error during the `PHP` request shutdown (rshutdown) phase when interacting with the database.
- Fixed the `Poll` event initialization exception after coroutine conversion of `pdo_pgsql`, ensuring the stability of blocking mode.
- Removed duplicate and redundant `Server` property configurations in `Swoole\Coroutine\Http\Server`.
- Fixed an issue in `Swoole\ArrayObject::valid()` where, under `PHP 8.5`, using `null` as the key parameter for `array_key_exists()` would trigger a deprecation warning: "Using null as the key parameter for array_key_exists() is deprecated."
- Fixed an issue in `SWOOLE_THREAD` mode where `Swoole\Server` could not start if the `set()` method was not called.
- Fixed a NULL pointer dereference that occurred when querying port properties during server shutdown, caused by the `ListenPort` pointer being `NULL`.
- Fixed an issue where, after a hooked `TLS` stream completed its handshake in `Socket::connect()`, the stream transport layer would attempt to enable encryption again instead of returning failure directly when the call failed or was canceled.
- Fixed an issue where the coroutine `HTTP` server still returned success when the protocol setting was rejected or `accept` failed.
- Fixed an issue where `HTTP` compression used the wrong data format when returning `deflate` encoding.
- Fixed an issue where destroying a native `CurlHandle` did not hand the object destruction work back to `ext-curl` when native `hook` was not enabled, resulting in incorrect destruction logic.
- Fixed an issue in `cURL multi` where, under `CURL_POLL_INOUT`, the "readable and writable simultaneously" event mask was not correctly restored, causing `HTTP/2` duplex transmission to be repeatedly woken up during flow-control blocking and form a busy loop.
- Fixed the lack of timeout support for `wait/wakeup` in atomic operations (`Atomic`) on the `Windows` platform.
- Fixed an issue where, after enabling `send_yield`, the peer closing the connection prevented the coroutine from being woken up, resulting in a coroutine leak.
- Fixed an issue where the `WebSocket` decoder did not reject control frames (`CLOSE`, `PING`, `PONG`) with the compression flag (`RSV1`), causing illegal frames to be incorrectly accepted.
- Fixed incorrect read/write behavior in coroutine `socket` with `iouring` enabled when `SSL/TLS` was enabled.
- Fixed an issue where improper maintenance of the `Swoole` coroutine context chain (`origin_ctx`) produced dangling pointers, causing occasional segmentation faults when a `Worker` parsed `HTTP` parameters.
- Fixed a NULL pointer dereference crash caused by passing a `NULL` port pointer when querying port properties (`ServerPortProperty`) while the `Swoole` server was closing a port.
- Fixed issues in `Swoole\Coroutine\Socket`'s `setOption()` on `SO_LINGER`, `SO_RCVTIMEO`, and `SO_SNDTIMEO`, including incorrect parameter validation, incorrect error messages, and crashes when an object was passed in.
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -978,6 +986,7 @@
<file role="test" name="tests/swoole_atomic/atomic.phpt" />
<file role="test" name="tests/swoole_atomic/dtor_in_child.phpt" />
<file role="test" name="tests/swoole_atomic/multi_wakeup.phpt" />
<file role="test" name="tests/swoole_atomic/timeout.phpt" />
<file role="test" name="tests/swoole_atomic/wait.phpt" />
<file role="test" name="tests/swoole_atomic/wait_and_wakeup.phpt" />
<file role="test" name="tests/swoole_atomic/wait_ex.phpt" />
Expand Down Expand Up @@ -1182,6 +1191,7 @@
<file role="test" name="tests/swoole_coroutine/destruct/destruct1.phpt" />
<file role="test" name="tests/swoole_coroutine/destruct/destruct2.phpt" />
<file role="test" name="tests/swoole_coroutine/destruct/destruct3.phpt" />
<file role="test" name="tests/swoole_coroutine/destruct/destruct4.phpt" />
<file role="test" name="tests/swoole_coroutine/dnslookup_1.phpt" />
<file role="test" name="tests/swoole_coroutine/dnslookup_2.phpt" />
<file role="test" name="tests/swoole_coroutine/dnslookup_3.phpt" />
Expand Down Expand Up @@ -1290,6 +1300,7 @@
<file role="test" name="tests/swoole_coroutine_scheduler/start_in_server_shutdown.phpt" />
<file role="test" name="tests/swoole_coroutine_scheduler/start_in_server_worker_stop.phpt" />
<file role="test" name="tests/swoole_coroutine_system/aio_thread_num.phpt" />
<file role="test" name="tests/swoole_coroutine_system/aio_worker_scheduling.phpt" />
<file role="test" name="tests/swoole_coroutine_system/empty_path.phpt" />
<file role="test" name="tests/swoole_coroutine_system/empty_path1.phpt" />
<file role="test" name="tests/swoole_coroutine_system/empty_path2.phpt" />
Expand Down Expand Up @@ -1392,11 +1403,13 @@
<file role="test" name="tests/swoole_curl/multi/curl_multi_select_basic1.phpt" />
<file role="test" name="tests/swoole_curl/multi/curl_multi_setopt_basic001.phpt" />
<file role="test" name="tests/swoole_curl/multi/dtor.phpt" />
<file role="test" name="tests/swoole_curl/multi/http2_duplex_stall.phpt" />
<file role="test" name="tests/swoole_curl/multi/multiple_binding.phpt" />
<file role="test" name="tests/swoole_curl/multi/no_hook.phpt" />
<file role="test" name="tests/swoole_curl/multi/select_cancel.phpt" />
<file role="test" name="tests/swoole_curl/multi/select_timeout.phpt" />
<file role="test" name="tests/swoole_curl/multi/select_twice.phpt" />
<file role="test" name="tests/swoole_curl/native_handle_destructor.phpt" />
<file role="test" name="tests/swoole_curl/non_exclusive.phpt" />
<file role="test" name="tests/swoole_curl/setopt/1.phpt" />
<file role="test" name="tests/swoole_curl/setopt/3.phpt" />
Expand Down Expand Up @@ -1712,6 +1725,7 @@
<file role="test" name="tests/swoole_http_server/client_compress.phpt" />
<file role="test" name="tests/swoole_http_server/co_switching.phpt" />
<file role="test" name="tests/swoole_http_server/compression.phpt" />
<file role="test" name="tests/swoole_http_server/compression_deflate.phpt" />
<file role="test" name="tests/swoole_http_server/compression_min_length.phpt" />
<file role="test" name="tests/swoole_http_server/compression_types.phpt" />
<file role="test" name="tests/swoole_http_server/cookieAlias.phpt" />
Expand Down Expand Up @@ -1816,6 +1830,7 @@
<file role="test" name="tests/swoole_http_server/url_rewrite.phpt" />
<file role="test" name="tests/swoole_http_server/worker_max_concurrency.phpt" />
<file role="test" name="tests/swoole_http_server/zstd.phpt" />
<file role="test" name="tests/swoole_http_server_coro/accept_failure.phpt" />
<file role="test" name="tests/swoole_http_server_coro/bad_request.phpt" />
<file role="test" name="tests/swoole_http_server_coro/buffer_clear.phpt" />
<file role="test" name="tests/swoole_http_server_coro/bug_2682.phpt" />
Expand Down Expand Up @@ -1848,6 +1863,7 @@
<file role="test" name="tests/swoole_http_server_coro/http2.phpt" />
<file role="test" name="tests/swoole_http_server_coro/http2_ssl.phpt" />
<file role="test" name="tests/swoole_http_server_coro/https.phpt" />
<file role="test" name="tests/swoole_http_server_coro/invalid_settings.phpt" />
<file role="test" name="tests/swoole_http_server_coro/ipv6.phpt" />
<file role="test" name="tests/swoole_http_server_coro/keepalive.phpt" />
<file role="test" name="tests/swoole_http_server_coro/open_frame.phpt" />
Expand All @@ -1872,6 +1888,7 @@
<file role="test" name="tests/swoole_http_server_coro/websocket_mixed.phpt" />
<file role="test" name="tests/swoole_http_server_coro/websocket_ping.phpt" />
<file role="test" name="tests/swoole_http_server_coro/websocket_ping_pong.phpt" />
<file role="test" name="tests/swoole_iouring/bug_1161.phpt" />
<file role="test" name="tests/swoole_iouring/mix.phpt" />
<file role="test" name="tests/swoole_iouring/setting.phpt" />
<file role="test" name="tests/swoole_library/array_object/base.phpt" />
Expand Down Expand Up @@ -2197,6 +2214,7 @@
<file role="test" name="tests/swoole_runtime/sockets/tcp_server.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/timeout.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/udp.phpt" />
<file role="test" name="tests/swoole_runtime/ssl/cancel_connect.phpt" />
<file role="test" name="tests/swoole_runtime/ssl/capture_peer_cert.phpt" />
<file role="test" name="tests/swoole_runtime/ssl/client.phpt" />
<file role="test" name="tests/swoole_runtime/ssl/enable_crypto.phpt" />
Expand Down Expand Up @@ -2253,6 +2271,7 @@
<file role="test" name="tests/swoole_server/bug_2313.phpt" />
<file role="test" name="tests/swoole_server/bug_2639.phpt" />
<file role="test" name="tests/swoole_server/bug_2736.phpt" />
<file role="test" name="tests/swoole_server/bug_6196.phpt" />
<file role="test" name="tests/swoole_server/bug_aio.phpt" />
<file role="test" name="tests/swoole_server/check_callback.phpt" />
<file role="test" name="tests/swoole_server/check_chunk_total_size.phpt" />
Expand Down Expand Up @@ -2508,6 +2527,7 @@
<file role="test" name="tests/swoole_socket_coro/server_accept.phpt" />
<file role="test" name="tests/swoole_socket_coro/setopt/bindtodevice.phpt" />
<file role="test" name="tests/swoole_socket_coro/setopt/ipv6_pktinfo.phpt" />
<file role="test" name="tests/swoole_socket_coro/setopt/linger.phpt" />
<file role="test" name="tests/swoole_socket_coro/setopt/multicast.phpt" />
<file role="test" name="tests/swoole_socket_coro/setopt/recvtimeo.phpt" />
<file role="test" name="tests/swoole_socket_coro/setopt/reuse.phpt" />
Expand Down Expand Up @@ -2597,6 +2617,7 @@
<file role="test" name="tests/swoole_thread/arraylist.phpt" />
<file role="test" name="tests/swoole_thread/async-io.phpt" />
<file role="test" name="tests/swoole_thread/atomic_ctor.phpt" />
<file role="test" name="tests/swoole_thread/atomic_timeout.phpt" />
<file role="test" name="tests/swoole_thread/barrier.phpt" />
<file role="test" name="tests/swoole_thread/co-stream.phpt" />
<file role="test" name="tests/swoole_thread/co-user-yield.phpt" />
Expand Down
Loading