From dc51b63e5ee112730c5ddcf3cfc792475c7eadf7 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Sat, 21 Mar 2026 17:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phinx-bootstrap.php | 9 ++++++--- phinx.php | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/phinx-bootstrap.php b/phinx-bootstrap.php index 3f6c3e1..75d5b3a 100644 --- a/phinx-bootstrap.php +++ b/phinx-bootstrap.php @@ -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); } diff --git a/phinx.php b/phinx.php index b4cf22a..d35998c 100644 --- a/phinx.php +++ b/phinx.php @@ -1,7 +1,7 @@