Skip to content

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

@phansys

Description

@phansys

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConsoleFeatureRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions