From 7d38f85828eae5e2328c0515d3c2a3c159cf8e3e Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 10 Mar 2026 09:36:09 +0300 Subject: [PATCH 1/2] Improve history table creating output --- CHANGELOG.md | 4 ++-- src/Informer/ConsoleMigrationInformer.php | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) 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 { From 42a0be612b9433c727241e590bc366a7de8d1a9b Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 10 Mar 2026 09:39:07 +0300 Subject: [PATCH 2/2] fix --- tests/Migration/ConsoleMigrationInformerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);