github swoole/swoole-src v6.0.0-beta

latest release: v5.1.5
pre-releaseone month ago

✨ New Feature:

  • Added Swoole\Thread\Map::find() method. @matyhtf
  • Added Swoole\Thread\ArrayList::find() method. @matyhtf
  • Added Swoole\Thread\ArrayList::offsetUnset() method. @matyhtf
  • Added Swoole\Process::getAffinity() method. @matyhtf
  • Added Swoole\Thread::setName() method. @matyhtf
  • Added Swoole\Thread::setAffinity() method. @matyhtf
  • Added Swoole\Thread::getAffinity() method. @matyhtf
  • Added Swoole\Thread::setPriority() method. @matyhtf
  • Added Swoole\Thread::getPriority() method. @matyhtf
  • Added Swoole\Thread::gettid() method.
  • The file asynchronous engine iouring supports multi-threaded polling mode IORING_SETUP_SQPOLL. @NathanFreeman
  • Added iouring_workers to modify the number of iouring threads. @NathanFreeman
  • Added iouring_flags to support modifying the iouring working mode. @NathanFreeman
  • Added Swoole\Thread\Barrier for multi-thread synchronization barrier. @matyhtf
  • Added new function and class to set cookies. @matyhtf @NathanFreeman

New Cookie API

$server->on('request', function (Swoole\Http\Request $request, Swoole\Http\Response $response) use ($pm) {
    $cookie = new Swoole\Http\Cookie();
    $cookie->withName('key1')
        ->withValue('val1')
        ->withExpires(time() + 84600)
        ->withPath('/')
        ->withDomain('id.test.com')
        ->withSecure(true)
        ->withHttpOnly(true)
        ->withSameSite('None')
        ->withPriority('High')
        ->withPartitioned(true);
       $response->setCookie($cookie);
       $response->end("<h1>Hello Swoole. #" . rand(1000, 9999) . "</h1>");
});

🐛 Bug Fixed:

  • Fixed the dynamic property issue in Swoole\Http2\Request. @guandeng
  • Fixed the occasional resource unavailability issue in the pgsql coroutine client. @NathanFreeman
  • Fixed the issue of 503 errors due to not resetting related parameters during process restart. @matyhtf
  • Fixed the inconsistency between $request->server['request_method'] and $request->getMethod() when HTTP2 is enabled. @matyhtf
  • Fixed incorrect content-type when uploading files. @matyhtf
  • Fixed code errors in the http2 coroutine client. @matyhtf
  • Fixed the missing worker_id property in Swoole\Server. @cjavad
  • Fixed errors related to brotli in config.m4. @fundawang
  • Fixed the invalid Swoole\Http\Response::create under multi-threading. @matyhtf
  • Fixed compilation errors in the macos environment. @matyhtf
  • Fixed the issue of threads not being able to exit safely. @matyhtf
  • Fixed the issue where the static variable for response time returned by Swoole\Http\Response in multi-threaded mode was not generated separately for each thread. @matyhtf @NathanFreeman

⭐️ Kernel Optimization:

  • Upgraded the Oracle database version for CI testing. @gvenzl
  • Refactored and optimized the underlying related code of swoole. @matyhtf
  • Optimized the underlying logic of sendfile. @matyhtf
  • Optimized parameter parsing. @matyhtf
  • Replaced PHP_DEF_HAVE with AC_DEFINE_UNQUOTED in config.m4. @petk
  • Optimized the logic related to heartbeat, shutdown, and stop for the server in multi-threaded mode. @matyhtf
  • Optimized to avoid linking librt when glibc version is greater than 2.17. @matyhtf
  • Enhanced the HTTP client to accept duplicate request headers. @matyhtf
  • Optimized Swoole\Http\Response::write(). @matyhtf
  • Swoole\Http\Response::write() can now send HTTP/2 protocol. @matyhtf
  • Compatible with PHP 8.4. @matyhtf @NathanFreeman
  • Added the ability for asynchronous writing at the underlying socket level. @matyhtf
  • Optimized Swoole\Http\Response. @NathanFreeman
  • Improved underlying error messages. @matyhtf
  • Supported sharing PHP native sockets in multi-threaded mode. @matyhtf
  • Optimized static file service and fixed static file path error issues. @matyhtf

❌ Deprecated:

  • Removed Swoole\Coroutine\System::fread(), Swoole\Coroutine\System::fwrite(), and Swoole\Coroutine\System::fgets() methods.

😊 Thank you

  • Thank you for your contribution to Swoole v6.0.0. Wish you good health, all the best, and smooth work.

✨ 新特性:

  • 新增Swoole\Thread\Map::find()方法。 @matyhtf
  • 新增Swoole\Thread\ArrayList::find()方法。 @matyhtf
  • 新增Swoole\Thread\ArrayList::offsetUnset()方法。 @matyhtf
  • 新增Swoole\Process::getAffinity()方法。 @matyhtf
  • 新增Swoole\Thread::setName()方法。 @matyhtf
  • 新增Swoole\Thread::setAffinity()方法。 @matyhtf
  • 新增Swoole\Thread::getAffinity()方法。 @matyhtf
  • 新增Swoole\Thread::setPriority()方法。 @matyhtf
  • 新增Swoole\Thread::getPriority()方法。 @matyhtf
  • 新增Swoole\Thread::gettid()方法。
  • 文件异步引擎iouring支持多线程轮询模式IORING_SETUP_SQPOLL@NathanFreeman
  • 新增iouring_workers修改iouring线程数。 @NathanFreeman
  • 新增iouring_flags支持修改iouring工作模式。 @NathanFreeman
  • 增加Swoole\Thead\Barrier多线程同步屏障。@matyhtf
  • 增加新的设置cookie的函数。 @matyhtf @NathanFreeman

🐛 Bug修复:

  • 修复Swoole\Http2\Request动态属性问题。 @guandeng
  • 修复pgsql协程客户端偶发资源不可用的问题。 @NathanFreeman
  • 修复进程重启,没有重置相关参数导致503错误的问题。@matyhtf
  • 修复开启HTTP2时,$request->server['request_method'] 与 $request->getMethod() 的结果不一致。 @matyhtf
  • 修复上传文件时,不正确的content-type@matyhtf
  • 修复http2协程客户端的代码错误。 @matyhtf
  • 修复Swoole\Server缺少属性worker_id的问题。 @cjavad
  • 修复config.m4有关brotli错误的问题。 @fundawang
  • 修复 多线程下Swoole\Http\Response::create无效。 @matyhtf
  • 修复macos环境下编译错误。 @matyhtf
  • 修复线程无法安全退出的问题。 @matyhtf
  • 修复多线程模式下,Swoole\Http\Response返回响应时间的静态变量没有各个线程各自生成一份的问题。 @matyhtf @NathanFreeman

⭐️ 内核优化:

  • 升级CI测试的oracle数据库版本。 @gvenzl
  • 重构优化swoole底层相关代码。 @matyhtf
  • 优化底层sendfile的相关逻辑。 @matyhtf
  • 优化参数解析。 @matyhtf
  • config.m4中用AC_DEFINE_UNQUOTED替换PHP_DEF_HAVE@petk
  • 优化多线程模式下,server的heartbeat,shutdownstop的相关逻辑。 @matyhtf
  • 优化glibc版本高于2.17时,不需要链接librt@matyhtf
  • 加强http客户端可以接受重复的请求头。 @matyhtf
  • 优化Swoole\Http\Response::write()@matyhtf
  • Swoole\Http\Response::write()现在可以发送http2协议。 @matyhtf
  • 兼容PHP8.4@matyhtf @NathanFreeman
  • 增加底层socket异步写入的能力。 @matyhtf
  • 优化Swoole\Http\Response@NathanFreeman
  • 优化底层错误信息。 @matyhtf
  • 多线程模式下,支持共享php原生socket@matyhtf
  • 优化静态文件服务,修复静态文件路径错误问题。 @matyhtf

❌ 废弃:

  • 移除Swoole\Coroutine\System::fread(), Swoole\Coroutine\System::fwrite()Swoole\Coroutine\System::fgets()方法

😊 致谢

  • 感谢你们为Swoole v6.0.0做出的贡献,祝愿大家身体健康,万事如意,工作顺利。

Don't miss a new swoole-src release

NewReleases is sending notifications on new releases.