top-think / think-worker

Workerman extend for ThinkPHP
Apache License 2.0
196 stars 58 forks source link

thinkphp8 使用think-worker扩展,提示workerman版本低的问题,希望提高对workerman高版本的支持 #60

Open majingsign opened 9 months ago

majingsign commented 9 months ago

框架版本:thinkphp8 php版本:>=php8.0

在liunx下执行命令出错 报错1:执行php think hello start --mode d Implicit conversion from float 2999991.1785125732 to int loses precision 解决:Workerman\Events\Select::class -> loop() 274行_selectTimeout属性传递到usleep(int)函数精度问题导致,使用int强转一下 usleep((int)$this->_selectTimeout)

报错2:fclose(): Argument #1 ($stream) must be of type resource, null given 解决:vendor/workerman/workerman/Worker.php,1245-1248行的fclose()函数加上判断 if ($STDOUT) { \fclose($STDOUT); } if ($STDERR) { \fclose($STDERR); } if (is_resource(\STDOUT)) { \fclose(\STDOUT); } if (is_resource(\STDERR)) { \fclose(\STDERR); }

希望尽快提高workerman的版本,并修改部分代码,谢谢~~~

chenhaitang commented 7 months ago

什么时候支持workerman4.0呀 @liu21st