workerman/gateway-worker从3.0.0版本升级到3.0.9出现这个问题

smile波

启动就报这个错,好像是addreadstream不兼容,版本是"require": {
"workerman/gateway-worker": "3.0.9",
"react/http-client": "^0.5.9",
"react/event-loop":"^0.4.3",
"clue/redis-react": "^1.0",
"workerman/mysql": "^1.0"
}
Fatal error: Declaration of Workerman\Events\React\Base::addReadStream($stream, $listener) must be compatible with React\EventLoop\LoopInterface::addReadStream($stream, callable $listener) in /var/www/ddz/doudizhu_server/vendor/workerman/workerman/Events/React/Base.php on line 22
Worker process terminated with ERROR: E_COMPILE_ERROR "Declaration of Workerman\Events\React\Base::addReadStream($stream, $listener) must be compatible with React\EventLoop\LoopInterface::addReadStream($stream, callable $listener) in /var/www/ddz/doudizhu_server/vendor/workerman/workerman/Events/React/Base.php on line 22"
worker exit with status 65280
 
 
求帮忙解决~急
 

阅读 1607
1个回答

walkor

reactPHP库版本之间不兼容,workerman使用的是最新版本的reactPHP,你可以尝试更新下react/event-loop。
如果有冲突只能手动更改下源码了

  • make 2020-08-21

    怎么获取gatewayworker3.0.8及其以上的版本