从 "workerman/webman-framework": "^1.6.6",
到 1.6.9
执行 composer update 后提示:
PHP Fatal error: Cannot redeclare run_path() (previously declared in /Users/lzy/website/huashi/vendor/workerman/webman-framework/src/support/helpers.php:58) in /Users/lzy/website/huashi/support/helpers.php on line 47
function run_path(string $path = ''): string
{
static $runPath = '';
if (!$runPath) {
$runPath = is_phar() ? dirname(Phar::running(false)) : BASE_PATH;
}
return path_combine($runPath, $path);
}
MacOS php8.2
"workerman/webman-framework": "^1.6.6",
1.6.9
应该怎样才以平滑升级呢?看文档说support/helpers.php 移动到vendor/workerman/webman-framework/src/support下
下,直接将support/helpers.php
删除,也不行,也有报错。
可能是你的webman版本太老了。
删除 support/helpers.php ,
然后删除
执行 composer dumpautoload
谢谢老大!是的版太老了原因👍