From e2f3c5129d07afb587bf6a0e6ffdbe12358ae18e Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Sun, 19 Sep 2021 08:53:37 +0200 Subject: [PATCH] xx --- .../Migrations/Tools/Console/Command/ExecuteCommand.php | 4 ++-- .../Migrations/Tools/Console/Command/MigrateCommand.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Migrations/Tools/Console/Command/ExecuteCommand.php b/lib/Doctrine/Migrations/Tools/Console/Command/ExecuteCommand.php index e7e10f351..c5c802212 100644 --- a/lib/Doctrine/Migrations/Tools/Console/Command/ExecuteCommand.php +++ b/lib/Doctrine/Migrations/Tools/Console/Command/ExecuteCommand.php @@ -114,10 +114,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int $migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory(); $migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input); - $databaseName = $this->getDependencyFactory()->getConnection()->getDatabase(); + $databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase(); $question = sprintf( 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', - $databaseName === '' || $databaseName === null ? '' : $databaseName + $databaseName === '' ? '' : $databaseName ); if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) { $this->io->error('Migration cancelled!'); diff --git a/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php b/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php index 4af73d3cd..aa58197b6 100644 --- a/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php +++ b/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php @@ -129,10 +129,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int $migratorConfigurationFactory = $this->getDependencyFactory()->getConsoleInputMigratorConfigurationFactory(); $migratorConfiguration = $migratorConfigurationFactory->getMigratorConfiguration($input); - $databaseName = $this->getDependencyFactory()->getConnection()->getDatabase(); + $databaseName = (string) $this->getDependencyFactory()->getConnection()->getDatabase(); $question = sprintf( 'WARNING! You are about to execute a migration in database "%s" that could result in schema changes and data loss. Are you sure you wish to continue?', - $databaseName === '' || $databaseName === null ? '' : $databaseName + $databaseName === '' ? '' : $databaseName ); if (! $migratorConfiguration->isDryRun() && ! $this->canExecute($question, $input)) { $this->io->error('Migration cancelled!');