diff --git a/src/Command/EntryCommand.php b/src/Command/EntryCommand.php index 5d4ca0b7..ec3756bd 100644 --- a/src/Command/EntryCommand.php +++ b/src/Command/EntryCommand.php @@ -83,7 +83,7 @@ public function run(array $argv, ConsoleIo $io): ?int // This is the variance from Command::run() if (!$args->getArgumentAt(0) && $args->getOption('help')) { - $backend = Configure::read('Migrations.backend', 'phinx'); + $backend = Configure::read('Migrations.backend', 'builtin'); $io->out([ 'Migrations', '', diff --git a/src/Command/MigrateCommand.php b/src/Command/MigrateCommand.php index 2b0ebbeb..a98442ed 100644 --- a/src/Command/MigrateCommand.php +++ b/src/Command/MigrateCommand.php @@ -80,6 +80,7 @@ public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionPar 'help' => "Mark any migrations selected as run, but don't actually execute them", 'boolean' => true, ])->addOption('dry-run', [ + 'short' => 'x', 'help' => 'Dump queries to stdout instead of executing them', 'boolean' => true, ])->addOption('no-lock', [ diff --git a/src/Migrations.php b/src/Migrations.php index 1ed553b9..7354436a 100644 --- a/src/Migrations.php +++ b/src/Migrations.php @@ -133,7 +133,7 @@ public function getCommand(): string */ protected function getBackend(): BuiltinBackend|PhinxBackend { - $backend = (string)(Configure::read('Migrations.backend') ?? 'phinx'); + $backend = (string)(Configure::read('Migrations.backend') ?? 'builtin'); if ($backend === 'builtin') { return new BuiltinBackend($this->default); } diff --git a/src/MigrationsPlugin.php b/src/MigrationsPlugin.php index ca0df2a7..1a4f47c4 100644 --- a/src/MigrationsPlugin.php +++ b/src/MigrationsPlugin.php @@ -83,7 +83,7 @@ public function bootstrap(PluginApplicationInterface $app): void parent::bootstrap($app); if (!Configure::check('Migrations.backend')) { - Configure::write('Migrations.backend', 'phinx'); + Configure::write('Migrations.backend', 'builtin'); } } diff --git a/tests/TestCase/Command/CompletionTest.php b/tests/TestCase/Command/CompletionTest.php index 45cb7712..ccf3a756 100644 --- a/tests/TestCase/Command/CompletionTest.php +++ b/tests/TestCase/Command/CompletionTest.php @@ -44,33 +44,12 @@ public function testMigrationsSubcommands() { $this->exec('completion subcommands migrations.migrations'); $expected = [ - 'dump mark_migrated migrate orm-cache-build orm-cache-clear create rollback seed status', + 'dump mark_migrated migrate rollback seed status', ]; $actual = $this->_out->messages(); $this->assertEquals($expected, $actual); } - /** - * Test that subcommands from the Migrations shell are correctly returned - * if needed with the autocompletion feature - * - * @return void - */ - public function testMigrationsOptionsCreate() - { - $this->exec('completion options migrations.migrations create'); - $this->assertCount(1, $this->_out->messages()); - $output = $this->_out->messages()[0]; - $expected = '--class -l --connection -c --help -h --path --plugin -p --quiet'; - $expected .= ' -q --source -s --template -t --verbose -v'; - $outputExplode = explode(' ', trim($output)); - sort($outputExplode); - $expectedExplode = explode(' ', $expected); - sort($expectedExplode); - - $this->assertEquals($outputExplode, $expectedExplode); - } - /** * Test that subcommands from the Migrations shell are correctly returned * if needed with the autocompletion feature