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

Skip to content

[Console] --verbose option does not allow values #18546

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
TobiasXy opened this issue Apr 14, 2016 · 1 comment
Closed

[Console] --verbose option does not allow values #18546

TobiasXy opened this issue Apr 14, 2016 · 1 comment
Labels

Comments

@TobiasXy
Copy link

On this page we can see an example command like this:

php application.php list --verbose=2

But as a matter of fact, it is not possible to provide a value to the --verbose option.

If you try it, the result is this exception:

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

To reproduce it you can run a simple command like this:
php bin/console router:match / --verbose=2

I guess this could be fixed in the InputDefinition (Symfony\Component\Console\Application::getDefaultInputDefinition method), by replacing InputOption::VALUE_NONE with InputOption::VALUE_OPTIONAL for the verbose option?

@TobiasXy TobiasXy changed the title --verbose option does not allow values [Console] --verbose option does not allow values Apr 14, 2016
@stof
Copy link
Member

stof commented Apr 14, 2016

this is actually a bug in the doc (--verbose is treated in a special way).

We cannot change the config of the option as you suggest, as it breaks BC badly (using bin/console router:match -v / would then pass / as the --verbose value rather than as an argument). We tried that in the past already.

Please open an issue on the doc repo to ask them to fix the doc.

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

No branches or pull requests

3 participants