From bd9f2cead8128804f3b7a22c946ccbb8e8e95b72 Mon Sep 17 00:00:00 2001 From: CoyoteRulea Date: Mon, 3 Jul 2017 16:33:06 -0500 Subject: [PATCH] Parameter cache-context fixed (#3374) * Parameter cache-context fixed * Module option properly indented --- src/Command/Generate/CacheContextCommand.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Command/Generate/CacheContextCommand.php b/src/Command/Generate/CacheContextCommand.php index 474082006..5ca9c0137 100644 --- a/src/Command/Generate/CacheContextCommand.php +++ b/src/Command/Generate/CacheContextCommand.php @@ -78,9 +78,13 @@ protected function configure() ->setName('generate:cache:context') ->setDescription($this->trans('commands.generate.cache.context.description')) ->setHelp($this->trans('commands.generate.cache.context.description')) - ->addOption('module', null, InputOption::VALUE_REQUIRED, $this->trans('commands.common.options.module')) ->addOption( - 'cache_context', + 'module', + null, + InputOption::VALUE_REQUIRED, + $this->trans('commands.common.options.module')) + ->addOption( + 'cache-context', null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.cache.context.questions.name') @@ -112,7 +116,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $module = $input->getOption('module'); - $cache_context = $input->getOption('cache_context'); + $cache_context = $input->getOption('cache-context'); $class = $input->getOption('class'); $services = $input->getOption('services'); @@ -140,13 +144,13 @@ protected function interact(InputInterface $input, OutputInterface $output) } // --cache_context option - $cache_context = $input->getOption('cache_context'); + $cache_context = $input->getOption('cache-context'); if (!$cache_context) { $cache_context = $io->ask( $this->trans('commands.generate.cache.context.questions.name'), sprintf('%s', $module) ); - $input->setOption('cache_context', $cache_context); + $input->setOption('cache-context', $cache_context); } // --class option