8000 [RFC] Should console `--quiet` option set mode `interactive=false`? · Issue #19899 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[RFC] Should console --quiet option set mode interactive=false? #19899

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
phansys opened this issue Sep 9, 2016 · 1 comment
Closed

[RFC] Should console --quiet option set mode interactive=false? #19899

phansys opened this issue Sep 9, 2016 · 1 comment
Labels
Console Feature RFC RFC = Request For Comments (proposals about features that you want to be discussed)

Comments

@phansys
Copy link
Contributor
phansys commented Sep 9, 2016

I have a command where I'm using the console this way:

if ($input->isInteractive() && !$this->io->confirm('Provide confirmation', false)) {
    // some stuff...
}

But when I execute the command with --quiet, the output is obviously not displayed but the process still waits for the user's response.
For this reason, I think the --quiet option (OutputInterface::VERBOSITY_QUIET) should set Input::$interactive as false.

OutputInterface::VERBOSITY_QUIET Do not output any messages -q or --quiet

Ref: http://symfony.com/doc/current/console/verbosity.html

If I don't misunderstood the intended behavior, I think it could be labeled as a bug.

@javiereguiluz javiereguiluz added Feature Console RFC RFC = Request For Comments (proposals about features that you want to be discussed) labels Sep 10, 2016
fabpot added a commit that referenced this issue Sep 14, 2016
…en command is executed with `--quiet` as verbosity level (phansys)

This PR was merged into the 2.7 branch.

Discussion
----------

[bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level

|Q            |A     |
|---          |---   |
|Branch       |2.7   |
|Bug fix?     |yes   |
|New feature? |no    |
|BC breaks?   |yes    |
|Deprecations?|no    |
|Tests pass?  |yes   |
|Fixed tickets|#19899|
|License      |MIT   |
|Doc PR       |n/a   |

Closes #19899.

Commits
-------

4214311 [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
@phansys
Copy link
Contributor Author
phansys commented Sep 14, 2016

Closing since #19923 is merged. Thank you.

@phansys phansys closed this as completed Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Console Feature RFC RFC = Request For Comments (proposals about features that you want to be discussed)
Projects
None yet
Development

No branches or pull requests

2 participants
0