diff --git a/src/Command/DevelDumperCommand.php b/src/Command/DevelDumperCommand.php index 2e06dd01b..33d8ee4d8 100644 --- a/src/Command/DevelDumperCommand.php +++ b/src/Command/DevelDumperCommand.php @@ -36,7 +36,7 @@ class DevelDumperCommand extends Command * DevelDumperCommand constructor. */ public function __construct( - DevelDumperPluginManager $develDumperPluginManager + DevelDumperPluginManager $develDumperPluginManager = null ) { $this->develDumperPluginManager = $develDumperPluginManager; diff --git a/src/Command/Yaml/MergeCommand.php b/src/Command/Yaml/MergeCommand.php index 53e1fd60d..fa5a50ee6 100644 --- a/src/Command/Yaml/MergeCommand.php +++ b/src/Command/Yaml/MergeCommand.php @@ -45,7 +45,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $dumper = new Dumper(); $final_yaml = array(); - $yaml_destination = $input->getArgument('yaml-destination'); + $yaml_destination = realpath($input->getArgument('yaml-destination')); $yaml_files = $input->getArgument('yaml-files'); if (count($yaml_files) < 2) { @@ -158,15 +158,22 @@ protected function interact(InputInterface $input, OutputInterface $output) $yaml_files = array(); while (true) { + // Set the string key based on among files provided + if(count($yaml_files) >= 2) { + $questionStringKey = 'commands.yaml.merge.questions.other-file'; + } + else { + $questionStringKey = 'commands.yaml.merge.questions.file'; + } + $yaml_file = $io->ask( - $this->trans('commands.yaml.merge.questions.file'), + $this->trans($questionStringKey), '', function ($file) use ($yaml_files, $io) { if (count($yaml_files) < 2 && empty($file)) { $io->error($this->trans('commands.yaml.merge.questions.invalid-file')); - return false; - } elseif (in_array($file, $yaml_files)) { + } elseif (!empty($file) && in_array($file, $yaml_files)) { $io->error( sprintf($this->trans('commands.yaml.merge.questions.file-already-added'), $file) ); @@ -185,7 +192,7 @@ function ($file) use ($yaml_files, $io) { } if ($yaml_file) { - $yaml_files[] = $yaml_file; + $yaml_files[] = realpath($yaml_file); } }