框架更新记录
框架更新记录仅仅整理自2020年10-24后的记录,其余记录以老版本文档或github记录为准。
3.4.2 - 2020-12-22
优化
-
task
优化,更加灵活的配置. -
crontab
优化,避免极端情况下任务不执行. -
http-dispatcher
优化,更加灵活的注册路由.
3.4.1 - 2020-11-18
新增
- 增加
SysConst::EXECUTE_COMMAND
,此常量可获取主框架内部所执行的command
. -
install
命令函数检查symlink
和readlink
。
修复
- 修复
worker
异常退出,没有清理table
信息。
移除
- 移除
command
及bridge
中动态配置config
的功能,因为3.4.x
的配置的存储不是使用swoole-table
来存储。
3.4.0 - 2020-10-24
与3.3.x
不兼容,需进行调整.
3.3.x -> 3.4.x
需要重新执行php vendor/bin/easyswoole install
.
新增
-
Core::getInstance()->runMode();
方法. 可通过此方法修改运行文件,默认dev
,也可以通过command
进行修改.
变更
-
command命令变更.
-
自定义
command
需进行调整. -
config
从swoole-table
改为splArray
,用户可自行调整. -
onRequest
及afterRequest
全局事件 变更为(initialize
注册即可):\EasySwoole\Component\Di::getInstance()->set(\EasySwoole\EasySwoole\SysConst::HTTP_GLOBAL_ON_REQUEST, callback); \EasySwoole\Component\Di::getInstance()->set(\EasySwoole\EasySwoole\SysConst::HTTP_GLOBAL_AFTER_REQUEST, callback);
callback
为回调函数,注入参数为:function (\EasySwoole\Http\Request $request, \EasySwoole\Http\Response $response){}
onRequest
事件需要返回bool
,来决定程序是否继续进行dispatcher
.
移除
-
移除
EasySwooleEvent
中onRequest
及afterRequest
全局事件. -
移除
Core::getInstance()->isDev();
方法. -
移除
Core::getInstance()->globalInitialize();
,可自行调用EasySwooleEvent::initialize()
.