Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.3.x |
the choice index is returned instead of the choice value when a default choice is specified and the command is executed with -n
the default value is set to the choice index here : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Style/SymfonyStyle.php#L230
so I’ve tried to run $io->askQuestion(new ChoiceQuestion($question, $choices, $default));
directly. it works on non interactive mode but fails on interactive mode
I think ChoiceQuestion
should override getDefault()
to solve this. I can make a PR for this but will this considered a BC break ? or does it falls in the bug fix category ?