Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] --verbose with param return an error #18545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Barno opened this issue Apr 14, 2016 · 1 comment
Closed

[Console] --verbose with param return an error #18545

Barno opened this issue Apr 14, 2016 · 1 comment

Comments

@Barno
Copy link

Barno commented Apr 14, 2016

Hi, if i use --verbose with param (--verbose=1,2,3) I have an error

[Symfony\Component\Console\Exception\RuntimeException]
The "--verbose" option does not accept a value.

I did these steps
Fresh installation
symfony new barno2 3.0.0
create Command with
php bin/console generate:command (my command is app:demo)
php bin/console app:demo --verbose=1
After this command I have the previous error

without param, return the VERBOSITY_VERBOSE

if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
      $output->writeln('<fg=black;bg=magenta>VERBOSE</>');
}

my final workflow


php bin/console app:demo --verbose
VERBOSE
Command result.

 php bin/console app:demo --verbose=1
  [Symfony\Component\Console\Exception\RuntimeException]
  The "--verbose" option does not accept a value.

PHP 5.6.10

@javiereguiluz
Copy link
Member

We tried to make the --verbose option to accept values ... but it was ultimately rejected: #17647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants