From eb1a569e9b10bbe195a9af28e0b484e7ca9a665d Mon Sep 17 00:00:00 2001 From: michalsn Date: Sat, 22 Aug 2026 12:37:16 +0200 Subject: [PATCH] fix: run setup migrations through command helper --- src/Commands/Setup.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Commands/Setup.php b/src/Commands/Setup.php index 0087649f0..4296d7692 100644 --- a/src/Commands/Setup.php +++ b/src/Commands/Setup.php @@ -14,12 +14,10 @@ namespace CodeIgniter\Shield\Commands; use CodeIgniter\CLI\CLI; -use CodeIgniter\Commands\Database\Migrate; use CodeIgniter\Shield\Commands\Setup\ContentReplacer; use CodeIgniter\Test\Filters\CITestStreamFilter; use Config\Autoload as AutoloadConfig; use Config\Email as EmailConfig; -use Config\Services; class Setup extends BaseCommand { @@ -419,15 +417,13 @@ private function runMigrations(): void return; } - $command = new Migrate(Services::logger(), Services::commands()); - // This is a hack for testing. // @TODO Remove CITestStreamFilter and refactor when CI 4.5.0 or later is supported. CITestStreamFilter::registration(); CITestStreamFilter::addOutputFilter(); CITestStreamFilter::addErrorFilter(); - $command->run(['all' => null]); + command('migrate --all'); CITestStreamFilter::removeOutputFilter(); CITestStreamFilter::removeErrorFilter();