很久没升级了,打算升级下,执行升级命令 composer require workerman/webman-framework ^1.4.7 && composer require webman/console ^1.2.12 && php webman install
composer require workerman/webman-framework ^1.4.7 && composer require webman/console ^1.2.12 && php webman install
PHP Fatal error: Uncaught Error: Call to a member function get() on null in /www/wwwroot/diancifaapi/vendor/workerman/webman-framework/src/support/Container.php:46
Stack trace:
#0 /www/wwwroot/diancifaapi/vendor/webman/console/src/Command.php(38): support\Container::__callStatic()
#1 /www/wwwroot/diancifaapi/vendor/webman/console/src/Command.php(13): Webman\Console\Command->installCommands()
#2 /www/wwwroot/diancifaapi/webman(17): Webman\Console\Command->installInternalCommands()
#3 {main}
thrown in /www/wwwroot/diancifaapi/vendor/workerman/webman-framework/src/support/Container.php on line 46
/www/wwwroot/diancifaapi/vendor/workerman/webman-framework/src/support/Container.php
第46行代码
43 public static function __callStatic(string $name, array $arguments)
44 {
45 $plugin = \Webman\App::getPluginByClass($name);
46 return static::instance($plugin)->{$name}(... $arguments);
47 }
composer镜像已恢复官方默认
centos7.8
webman 1.3.14
PHP 8.1.9 (cli) (built: Aug 9 2022 10:39:55) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.9, Copyright (c) Zend Technologies
如果有问题就重新创建一个项目,然后把业务目录app拷贝进去