Skip to content

Commit

Permalink
Merge branch '4.4' into 5.4
Browse files Browse the repository at this point in the history
* 4.4:
  [HttpKernel] Fix empty request stack when terminating with exception
  [HttpKernel] Remove EOL when using error_log() in HttpKernel Logger
  s/annd/and
  s/gargage/garbage
  [Console] Fix error output on windows cli
  Reserve keys when using numeric ones
  add missing Azerbaijani translations
  fix few typos/inconsistencies in latvian translations
  fix: use message object from event
  • Loading branch information
nicolas-grekas committed Oct 18, 2022
2 parents 984ea2c + f83da4d commit ae0727b
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Application.php
Expand Up @@ -276,7 +276,7 @@ public function doRun(InputInterface $input, OutputInterface $output)
$alternative = $alternatives[0];

$style = new SymfonyStyle($input, $output);
$style->block(sprintf("\nCommand \"%s\" is not defined.\n", $name), null, 'error');
$style->block(sprintf('Command "%s" is not defined.', $name), null, 'error', ' ', true);
if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) {
if (null !== $this->dispatcher) {
$event = new ConsoleErrorEvent($input, $output, $e);
Expand Down Expand Up @@ -933,11 +933,21 @@ protected function configureIO(InputInterface $input, OutputInterface $output)
}

switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break;
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: $shellVerbosity = 0; break;
case -1:
$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
break;
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:
$shellVerbosity = 0;
break;
}

if (true === $input->hasParameterOption(['--quiet', '-q'], true)) {
Expand Down

0 comments on commit ae0727b

Please sign in to comment.