Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #27772 [Console] Fixes multiselect choice question defaults in no…
…n-interactive mode (veewee) This PR was merged into the 2.8 branch. Discussion ---------- [Console] Fixes multiselect choice question defaults in non-interactive mode | Q | A | ------------- | --- | Branch? | >4.1.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | [This commit](41ffc69) introduced a warning in multiselect mode: ``` PHP Notice: Undefined index: in /tmp/vendor/symfony/console/Helper/QuestionHelper.php on line 52 PHP Stack trace: PHP 1. {main}() /tmp/vendor/phpro/grumphp/bin/grumphp:0 PHP 2. GrumPHP\Console\Application->run() /tmp/vendor/phpro/grumphp/bin/grumphp:31 PHP 3. GrumPHP\Console\Application->run() /tmp/vendor/phpro/grumphp/src/Console/Application.php:240 PHP 4. GrumPHP\Console\Application->doRun() /tmp/vendor/symfony/console/Application.php:145 PHP 5. GrumPHP\Console\Application->doRunCommand() /tmp/vendor/symfony/console/Application.php:262 PHP 6. GrumPHP\Console\Command\ConfigureCommand->run() /tmp/vendor/symfony/console/Application.php:904 PHP 7. GrumPHP\Console\Command\ConfigureCommand->execute() /tmp/vendor/symfony/console/Command/Command.php:251 PHP 8. GrumPHP\Console\Command\ConfigureCommand->buildConfiguration() /tmp/vendor/phpro/grumphp/src/Console/Command/ConfigureCommand.php:95 PHP 9. Symfony\Component\Console\Helper\QuestionHelper->ask() /tmp/vendor/phpro/grumphp/src/Console/Command/ConfigureCommand.php:156 Notice: Undefined index: in /tmp/vendor/symfony/console/Helper/QuestionHelper.php on line 52 ``` This PR fixes this issue by parsing the default value using the built-in validator if available. (which most likely is ...) Commits ------- 099e265 [Console] Fixes multiselect choice question in interactive mode with default values
- Loading branch information