diff --git a/CHANGELOG.md b/CHANGELOG.md index 272bd5b5..7e329e89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,9 @@ - Enh #318: Remove unnecessary files from Composer package (@mspirkov) - Enh #319: Remove confirmation prompt from `migrate:create` command as creating a migration is non-destructive (@samdark) - Enh #319: Improve styling of confirmations (@samdark) -- Enh #320: Improve output of `migrate:up`, `migrate:down`, `migrate:redo`, `migrate:new`, `migrate:history`, and +- Enh #322, #330: Improve output of `migrate:up`, `migrate:down`, `migrate:redo`, `migrate:new`, `migrate:history`, and `migrate:create` commands: remove redundant messages, replace `>>>` with cleaner output, and move "Database - connection" info to the top (@samdark) + connection" info to the top (@samdark, @vjik) ## 2.0.1 December 20, 2025 diff --git a/src/Informer/ConsoleMigrationInformer.php b/src/Informer/ConsoleMigrationInformer.php index 576ff72b..0341aa59 100644 --- a/src/Informer/ConsoleMigrationInformer.php +++ b/src/Informer/ConsoleMigrationInformer.php @@ -15,10 +15,13 @@ final class ConsoleMigrationInformer implements MigrationInformerInterface public function beginCreateHistoryTable(string $message): void { - $this->io?->section($message); + $this->io?->write($message); } - public function endCreateHistoryTable(string $message): void {} + public function endCreateHistoryTable(string $message): void + { + $this->io?->writeln("\t$message"); + } public function beginCommand(string $message): void { diff --git a/tests/Migration/ConsoleMigrationInformerTest.php b/tests/Migration/ConsoleMigrationInformerTest.php index f85685f4..94590bd8 100644 --- a/tests/Migration/ConsoleMigrationInformerTest.php +++ b/tests/Migration/ConsoleMigrationInformerTest.php @@ -22,7 +22,7 @@ public function testBeginCreateHistoryTableWithoutIo(): void public function testBeginCreateHistoryTableWithIo(): void { $io = $this->createMock(SymfonyStyle::class); - $io->expects($this->once())->method('section')->with('Creating migration history table...'); + $io->expects($this->once())->method('write')->with('Creating migration history table...'); $informer = new ConsoleMigrationInformer(); $informer->setIo($io);