升级 1.4.7后,./webman脚本执行出错

banro512

升级命令

composer require workerman/webman-framework ^1.4.7 && composer require webman/console ^1.0.27

然后执行 ./webman 或 ./webman install 等

./webman
PHP Fatal error:  Uncaught Error: Cannot use object of type Webman\Container as array in /www/wwwroot/xxx/webman:24
Stack trace:
#0 {main}
  thrown in /www/wwwroot/xxx/webman on line 24

Fatal error: Uncaught Error: Cannot use object of type Webman\Container as array in /www/wwwroot/xxx/webman:24
Stack trace:
#0 {main}
  thrown in /www/wwwroot/xxx/webman on line 24

Workerman version:4.1.1
webman-framework 1.4.7
PHP version:8.1.9

876 1 0
1个回答

walkor

webman/console 用 v1.2.12 或者后续更高版本

  • banro512 2022-09-20

    可以了。
    不过直接用 composer require webman/console ^1.2.12 升级显示成功了,composer.json 里版本也更新了,但执行 ./webman 仍然报同样错误。
    最后从 vendor/webman/ 里删掉了 console 目录,从 composer.json 删掉了console信息,再安装后可以了

年代过于久远,无法发表回答
🔝