From 6b4afd8411b65d71b219542cad652181f8b5e14f Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Fri, 20 Oct 2017 13:46:23 +0300 Subject: [PATCH 1/2] Updated --- src/Command/Db/AbstractDbCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/Db/AbstractDbCommand.php b/src/Command/Db/AbstractDbCommand.php index 50c308b..4de2909 100644 --- a/src/Command/Db/AbstractDbCommand.php +++ b/src/Command/Db/AbstractDbCommand.php @@ -42,7 +42,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $phinxArguments['command'] = $commandName; - $phinxArguments['--configuration'] = PATH_APPLICATION .DS. 'configs' .DS. 'phinx.php'; + $phinxArguments['--configuration'] = PATH_APPLICATION . DS . 'configs' . DS . 'phinx.php'; $phinxArguments['--environment'] = 'default'; $phinxInput = new ArrayInput($phinxArguments); From 3d7d31b8894e31ebe91ca2a81c21b268d0aa5725 Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Tue, 24 Oct 2017 19:00:44 +0300 Subject: [PATCH 2/2] Fixed Phinx proxy --- src/Command/Db/AbstractDbCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Command/Db/AbstractDbCommand.php b/src/Command/Db/AbstractDbCommand.php index 4de2909..96bfe2b 100644 --- a/src/Command/Db/AbstractDbCommand.php +++ b/src/Command/Db/AbstractDbCommand.php @@ -43,7 +43,9 @@ protected function execute(InputInterface $input, OutputInterface $output) $phinxArguments['command'] = $commandName; $phinxArguments['--configuration'] = PATH_APPLICATION . DS . 'configs' . DS . 'phinx.php'; - $phinxArguments['--environment'] = 'default'; + if ($command->getDefinition()->hasOption('environment')) { + $phinxArguments['--environment'] = 'default'; + } $phinxInput = new ArrayInput($phinxArguments); $command->run($phinxInput, $output);