修复安装安装时报错

This commit is contained in:
2026-03-21 17:44:52 +08:00
parent e7dfb238e3
commit dc51b63e5e
2 changed files with 19 additions and 5 deletions

View File

@@ -42,9 +42,12 @@ if (!function_exists('env')) {
require $baseDir . '/vendor/workerman/webman-framework/src/support/helpers.php';
require $baseDir . '/app/functions.php';
Webman\Config::load($baseDir . '/config', ['route', 'middleware', 'process', 'server', 'static']);
// 与 phinx.php 一致直接加载 thinkorm避免 Webman config() 与 Phinx 表前缀不一致
$thinkorm = require $baseDir . '/config/thinkorm.php';
use Webman\Config;
Config::clear();
Config::load($baseDir . '/config', ['route', 'middleware', 'process', 'server', 'static']);
// 与 Webman\ThinkOrm\ThinkOrm::start() 一致,并与 phinx.php 中 $thinkorm 来源一致
$thinkorm = array_replace_recursive(config('thinkorm', []), config('think-orm', []));
if (!empty($thinkorm)) {
support\think\Db::setConfig($thinkorm);
}