Skip to content

Commit 0dd30a6

Browse files
6.1.0 release (#5897)
1 parent b66d54d commit 0dd30a6

File tree

3 files changed

+29
-31
lines changed

3 files changed

+29
-31
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
22
project(libswoole)
33

44
enable_language(ASM)
5-
set(SWOOLE_VERSION 6.1.0RC2)
5+
set(SWOOLE_VERSION 6.1.0)
66

77
set(CMAKE_CXX_STANDARD 14)
88
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include/swoole_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#define SWOOLE_MAJOR_VERSION 6
2222
#define SWOOLE_MINOR_VERSION 1
2323
#define SWOOLE_RELEASE_VERSION 0
24-
#define SWOOLE_EXTRA_VERSION "RC2"
25-
#define SWOOLE_VERSION "6.1.0RC2"
24+
#define SWOOLE_EXTRA_VERSION ""
25+
#define SWOOLE_VERSION "6.1.0"
2626
#define SWOOLE_VERSION_ID 60100
2727
#define SWOOLE_API_VERSION_ID 0x202208a
2828

package.xml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,43 +52,41 @@
5252
<date>2025-10-15</date>
5353
<time>16:00:00</time>
5454
<version>
55-
<release>6.1.0RC2</release>
55+
<release>6.1.0</release>
5656
<api>6.0</api>
5757
</version>
5858
<stability>
59-
<release>beta</release>
60-
<api>beta</api>
59+
<release>stable</release>
60+
<api>stable</api>
6161
</stability>
6262
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license>
6363
<notes>
64-
# ✨ New Features
65-
- Added the `$throw_exception` parameter to `Swoole\Coroutine::cancel()`, enabling exceptions to be thrown when canceling coroutines.
66-
- `Swoole\Coroutine\Http\Client` and `Swoole\Coroutine\Http\Server` now support receiving WebSocket fragmented messages.
67-
- Added `disconnect` and `ping` methods to `Swoole\Coroutine\Http\Client` and `Swoole\Coroutine\Http\Server`.
68-
- Refactored `Swoole\Coroutine\Lock`, `Swoole\Lock`, and `Swoole\Thread\Lock`, retaining only the `__construct`, `lock`, and `unlock` methods to align more closely with `php flock` in usage.
64+
Major Changes in Swoole 6.1.0
65+
1. Introduction of "Standard Library Extensions" - Revolutionary Syntax Enhancements
66+
This is the most eye-catching feature at the language level in this update, allowing object-oriented operations on basic types.
67+
Object-Oriented Basic Types: Methods can be called directly on variables of basic types like string, array, and stream (e.g., $text->length()->lower()), greatly improving code readability and development experience.
68+
Typed Arrays: Introduced the typed_array syntax, allowing constraints on key and value types, with type checks performed on write operations, enhancing code robustness.
6969

70-
# 🐛 Bug Fixes
71-
- Fixed an issue where `Swoole\Websocket\Server` might still trigger the `onMessage` callback after a handshake failure or connection closure.
72-
- Fixed execution errors in `Swoole\Coroutine\Http\Server` caused by inconsistencies between function return types and signatures.
73-
- Fixed the issue where `Swoole\Coroutine\Http\Server` did not support enabling HTTP/2.
74-
- Fixed the timeout precision conversion issue in `Swoole\Lock::lockwait()`.
75-
- Fixed the `ReactorEpoll::add(): failed to add event` warning when using the coroutine-based `curl` module, caused by PHP 8 compatibility adjustments and incomplete cleanup of `keepalive` connections.
70+
2. A Major Leap in Underlying Architecture and Stability
71+
This version invests heavily in code quality and stability, laying a solid foundation for future development.
72+
Significant Increase in Test Coverage to 86%: By systematically adding test cases, potential errors are greatly reduced, improving the overall reliability and maintainability of the project.
73+
Large-Scale Code Refactoring and Static Analysis: Refactored multiple core modules like Reactor, SSL, and Socket, and used clang-tidy for code standardization, significantly improving code quality and performance.
7674

77-
# 🛠️ Internal Optimizations
78-
- Upgraded the `Swoole library` version.
79-
- Disabled the `-Wdate-time` warning to resolve compilation errors when using Zig/Clang.
80-
- Removed PHP 8.0 compatibility code.
81-
- Added the `SWOOLE_ODBC_LIBS` variable in `config.m4`.
82-
- Ensured that `timespec.tv_nsec` values are less than `1,000,000,000` to comply with POSIX standards.
75+
3. Major Simplification and Unification of the Lock API
76+
A groundbreaking refactoring of the core component for concurrent programming – the lock.
77+
API Simplification: Removed methods like lockwait and trylock, retaining only three core methods – __construct, lock, and unlock – for Swoole\Coroutine\Lock, Swoole\Lock, and Swoole\Thread\Lock.
78+
Unified Behavior: The new API design is closer to PHP's native flock function, reducing the learning curve, and uses standard constants like LOCK_EX | LOCK_NB to implement advanced features such as non-blocking.
8379

84-
# ⚠️ Notes
85-
- This version is an RC (Release Candidate) and should only be used in testing environments. Do not deploy it in production.
86-
- Starting from Swoole 6.1, `Swoole\Coroutine\Http\Client` and `Swoole\Coroutine\Http\Server` will automatically handle WebSocket control frames unless `open_websocket_ping_frame`, `open_websocket_pong_frame`, or `open_websocket_close_frame` are explicitly set.
87-
- `Swoole\Coroutine::cancel()` cannot cancel file coroutine operations. Forcibly canceling may cause segmentation faults.
88-
- If `--enable-iouring` is enabled, a warning will be thrown if the kernel version or `liburing` version does not meet the requirements.
89-
- The `Swoole\Websocket\Server::push` method does not automatically close the connection after sending a close frame. To close the connection, use the `Swoole\Websocket\Server::disconnect()` method.
90-
- When handling control frames, the Swoole protocol actively sets the FIN flag to 1 and ensures compression is not enabled (i.e., the RSV1 bit is 0). User settings for this will be ignored.
91-
- When handling compression and sending of consecutive frames, Swoole delegates the responsibility of compression and data chunking to the application layer. Users need to manually implement the relevant logic. See the example below for details.
80+
4. Enhanced Coroutine Capabilities and Fine-Grained Control
81+
More flexible coroutine operation capabilities.
82+
Coroutine Cancellation Mechanism: Swoole\Coroutine::cancel() now includes a $throw_exception parameter, allowing a catchable Swoole\Coroutine\CanceledException to be thrown into the target coroutine upon cancellation, enabling safer and more controllable coroutine lifecycle management.
83+
Coroutine State Isolation for Serialization Operations: Fixed the issue of global state isolation for serialize/unserialize in coroutine environments. Global variables related to serialization are now automatically saved and restored during coroutine switches, ensuring isolated serialization contexts for each coroutine.
84+
85+
5. Default HTTP Parser Upgrade, Websocket Feature Enhancements, and Platform Compatibility Improvements
86+
Important improvements in performance and compatibility.
87+
llHTTP Enabled by Default: Replaced the old http_parser with the more performant and modern llhttp, improving the efficiency and reliability of HTTP processing.
88+
WebSocket Feature Enhancements: Both client and server now support receiving fragmented messages, actively disconnecting (disconnect), and sending Ping frames (ping), making the WebSocket protocol implementation more complete.
89+
Deprecating Select, Embracing Poll: Completely deprecated the flawed select event mechanism. On platforms that do not support epoll/kqueue (like Cygwin), poll is now used by default, enabling support for a large number of concurrent connections on these platforms as well.
9290
</notes>
9391
<contents>
9492
<dir name="/">

0 commit comments

Comments
 (0)