From a5a5b01211dbf182457880034169eb2ca6316016 Mon Sep 17 00:00:00 2001 From: Jean-Michel Leclercq Date: Mon, 4 Mar 2024 08:15:25 +0100 Subject: [PATCH] [make:migration] add ability to specify a configuration file (#516) Co-authored-by: Jesse Rushlow --- src/Maker/MakeMigration.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Maker/MakeMigration.php b/src/Maker/MakeMigration.php index 82e1c84bb..52567a115 100644 --- a/src/Maker/MakeMigration.php +++ b/src/Maker/MakeMigration.php @@ -68,6 +68,7 @@ public function configureCommand(Command $command, InputConfiguration $inputConf ->addOption('db', null, InputOption::VALUE_REQUIRED, 'The database connection name') ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager name') ->addOption('shard', null, InputOption::VALUE_REQUIRED, 'The shard connection name') + ->addOption('configuration', null, InputOption::VALUE_OPTIONAL, 'The path of doctrine configuration file') ; } @@ -89,6 +90,10 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen if ($input->hasOption('shard') && null !== $input->getOption('shard')) { $options[] = '--shard='.$input->getOption('shard'); } + + if (null !== $input->getOption('configuration')) { + $options[] = '--configuration='.$input->getOption('configuration'); + } // end 2.x support if ($input->getOption('formatted')) {