Skip to content

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

Closed
@TobiasXy

Description

@TobiasXy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions