52

ThinkPHP升级至 5.1.18 版本

 5 years ago
source link: https://www.linuxprobe.com/thinkphp-swoole-workerman.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
导读 V5.1.18版本主要完善了对`Swoole`和`Workerman`的`HttpServer`运行支持,改进`Request`类,并修正了一些已知的问题。

v5.1.18主要更新:
*改进关联`append`方法的处理
*路由初始化和检测方法分离
*修正`destroy`方法强制删除
*`app_init`钩子位置移入`run`方法
*`think-swoole`扩展更新到2.0版本
*`think-worker`扩展更新到2.0版本
*改进Url生成的域名自动识别
*`Request`类增加`setPathinfo`方法和`setHost`方法
*`Request`类增加`withGet`/`withPost`/`withHeader`/`withServer`/`withCookie`/`withEnv`方法进行赋值操作
*Route类改进`host`属性的获取
*解决注解路由配置不生效的问题
*取消Test日志驱动,改为使用`close`设置关闭全局日志写入
*修正路由的`response`参数
*修正204响应输出的判断

从`5.1.17`版本可以无缝升级到`5.1.18`。由于取消了Test日志驱动,如果使用了Test日志驱动,请在log.php中改为使用下面的配置全局关闭。

Swoole/Workerman支持

该版本开始,可以更好的支持Swoole和Workerman的HTTPServer运行。

在你的项目根目录下面,安装或者更新think-swoole(或者think-worker)扩展

然后启动HttpServer服务

注意:swoole不支持windows服务器


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK