Fix handling of --verbose=... and BC break
This commit is contained in:
parent
16cdb6128e
commit
b62d35feb9
@ -184,19 +184,13 @@ class Application
|
|||||||
|
|
||||||
if (true === $input->hasParameterOption(array('--quiet', '-q'))) {
|
if (true === $input->hasParameterOption(array('--quiet', '-q'))) {
|
||||||
$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
|
$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
|
||||||
}
|
} else {
|
||||||
|
if ($input->hasParameterOption('-vvv') || $input->hasParameterOption('--verbose=3')) {
|
||||||
if (true === $input->hasParameterOption('-v')) {
|
$output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
|
||||||
$output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
|
} elseif ($input->hasParameterOption('-vv') || $input->hasParameterOption('--verbose=2')) {
|
||||||
}
|
$output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
|
||||||
|
} elseif ($input->hasParameterOption('-v') || $input->hasParameterOption('--verbose=1') || $input->hasParameterOption('--verbose')) {
|
||||||
if (true === $input->hasParameterOption('--verbose')) {
|
$output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
|
||||||
switch ($input->getParameterOption('--verbose', 1)) {
|
|
||||||
case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break;
|
|
||||||
case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break;
|
|
||||||
case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break;
|
|
||||||
|
|
||||||
default: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user