Skip to content

Commit 65ec1ba

Browse files
authored
fix: run setup migrations through command helper (#1376)
1 parent 52ea22d commit 65ec1ba

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/Commands/Setup.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@
1414
namespace CodeIgniter\Shield\Commands;
1515

1616
use CodeIgniter\CLI\CLI;
17-
use CodeIgniter\Commands\Database\Migrate;
1817
use CodeIgniter\Shield\Commands\Setup\ContentReplacer;
1918
use CodeIgniter\Test\Filters\CITestStreamFilter;
2019
use Config\Autoload as AutoloadConfig;
2120
use Config\Email as EmailConfig;
22-
use Config\Services;
2321

2422
class Setup extends BaseCommand
2523
{
@@ -419,15 +417,13 @@ private function runMigrations(): void
419417
return;
420418
}
421419

422-
$command = new Migrate(Services::logger(), Services::commands());
423-
424420
// This is a hack for testing.
425421
// @TODO Remove CITestStreamFilter and refactor when CI 4.5.0 or later is supported.
426422
CITestStreamFilter::registration();
427423
CITestStreamFilter::addOutputFilter();
428424
CITestStreamFilter::addErrorFilter();
429425

430-
$command->run(['all' => null]);
426+
command('migrate --all');
431427

432428
CITestStreamFilter::removeOutputFilter();
433429
CITestStreamFilter::removeErrorFilter();

0 commit comments

Comments
 (0)