15 use Symfony\Component\Console\Command\Command;
16 use Symfony\Component\Console\Input\InputArgument;
17 use Symfony\Component\Console\Input\InputInterface;
18 use Symfony\Component\Console\Input\InputOption;
19 use Symfony\Component\Console\Output\OutputInterface;
56 private $changeDetector;
77 private $emulatedAreaProcessor;
91 $this->facade = $facade;
92 $this->changeDetector = $changeDetector;
94 $this->emulatedAreaProcessor = $emulatedAreaProcessor;
96 parent::__construct();
105 self::INPUT_ARGUMENT_PATH,
106 InputArgument::OPTIONAL,
107 'Configuration path for example group/section/field_name' 110 self::INPUT_ARGUMENT_VALUE,
111 InputArgument::OPTIONAL,
112 'Configuration value' 115 self::INPUT_OPTION_INTERACTIVE,
117 InputOption::VALUE_NONE,
118 'Enable interactive mode to set all sensitive variables' 121 self::INPUT_OPTION_SCOPE,
123 InputOption::VALUE_OPTIONAL,
124 'Scope for configuration, if not set use \'default\'',
128 self::INPUT_OPTION_SCOPE_CODE,
130 InputOption::VALUE_OPTIONAL,
131 'Scope code for configuration, empty string by default',
134 $this->setName(
'config:sensitive:set')
135 ->setDescription(
'Set sensitive configuration values');
147 .
'This command is unavailable right now. ' 148 .
'To continue working with it please run app:config:import or setup:upgrade command before.' 156 $this->emulatedAreaProcessor->process(
function () use ($input,
$output) {
157 $this->facade->process($input,
$output);
162 }
catch (\Exception $e) {
164 sprintf(
'<error>%s</error>', $e->getMessage())
const INPUT_OPTION_INTERACTIVE
const INPUT_OPTION_SCOPE_CODE
const INPUT_ARGUMENT_PATH
__construct(SensitiveConfigSetFacade $facade, ChangeDetector $changeDetector, Hash $hash, EmulatedAdminhtmlAreaProcessor $emulatedAreaProcessor)
const INPUT_ARGUMENT_VALUE
execute(InputInterface $input, OutputInterface $output)