Closed mgolshan-talentnet closed 6 years ago
Try removing the call $command->interact($input, $output); and adding $inputArguments->setInteractive(false);
@caciobanu Thanks for quick response. I just tried and it still the same. Actually, I added that line of code after trying different solutions.
Wait. Looks like you updated your comment $inputArguments->setInteractive(false); worked 👏
Thanks
@caciobanu I am running to another issue now. As you see, I am trying to run the command in a loop. Looks like, on each round, it tries to register the migration versions. So, in the second round of the loop, I get this error:
Migration version 20180626192820 already registered with class AntiMattr\MongoDB\Migrations\Version
Thanks @caciobanu Looks like Symfony process is a working solution. Cheers
Hi.
I am trying to run the command inside another command using a loop for all DBs.
Unfortunately, the process doesn't go through because it keeps asks for the confirmation on each call. I tried different ways to pass the option
--no-interaction
. But, no luck. When I run the commandmongodb:migrations:migrate
by itself and passing the option, it works.Here is my code:
Could you advise a solution?