Binary Alan

Results 14 comments of Binary Alan

It is difficult to understand why this problem has not been resolved after five or six years. Since people need this feature, it should be added.

据我的了解,hyperf现在没有reload这种平滑重启的方式。推荐的服务部署的方式是用新的pod替换旧的pod,新的请求全部转到新的pod上,等旧的pod的请求全部完成后,再销毁旧的pod 你们的部署方式是拉代码,然后重新reload吗?用这种方式reload的过程无法接收新的请求,不是很友好

> 模型方法不能支持这种写法 > > 后期会有各种问题 > > ``` > Db::raw('ct + 1') > ``` 可以举个可能出现问题的例子吗? 模型其实已经事实上支持了Expression的用法,只是我在使用的过程中发现会有警告的抛出,才想着把它处理一下

@limingxinleo 模型的update方法实际使用的是database的Builder,如果修改`vendor/hyperf/database/src/Model/Builder.php`的`updateOrCreate`方法,把model操作改成Builder操作,是否可行? ```php public function updateOrCreate(array $attributes, array $values = []) { return tap($this->firstOrNew($attributes), function ($instance) use ($values) { // $instance->fill($values)->save(); 原来的代码 $instance->newQuery()->update($values); // 改动后的代码 }); } ```

> 如何判断启动的环境? 在`phpunit.xml`中定义Env ```xml ``` 就可以用`env('APP_ENV')` 获取到`testing`

> 我记得 2.2 的单测是有些问题的,无法获取到 phpunit.xml 中的 env 配置信息 于是我直接使用 putenv 将单测配置写进了 test/bootstrap.php @limingxinleo 发现项目启动的过程会把phpunit.xml里的env配置信息给覆盖

I encountered the same problem. When I try to connect to the database using TablePlus, I get the error message: "Lost connection to MySQL server at 'handshake: reading initial communication...

fzaninotto/faker is deprecated, so I submitted this PR #96