Skip to content

symfony/console --no-ansi option removed but present in the logic #41531

Closed
@yaroslav-spryker

Description

@yaroslav-spryker

Symfony version(s) affected: 5.3

Description
In the 5.3 version of the symfony/console we do not have the declaration of --no-ansi parameter anymore
https://github.com/symfony/console/blob/5.3/Application.php#L1039

BUT we have the logic with the check
https://github.com/symfony/console/blob/5.3/Application.php#L885
And in several places of this file as well.
Seems to be a bug or the code needs to be cleaned up.

How to reproduce
Execute the code similar to below with getting this option value
$userOptions['colors'] = $this->options['no-colors'] || $input->getOption('no-ansi') ? false : $config['settings']['colors'];

Possible Solution
To return back the definition of --no-ansi parameter to the
Application:: getDefaultInputDefinition()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions