This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Fabien Potencier bad48671a4 bug #27772 [Console] Fixes multiselect choice question defaults in non-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](41ffc69fa0) 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
-------

099e265711 [Console] Fixes multiselect choice question in interactive mode with default values
2018-10-12 09:06:41 -07:00
.composer Drop hirak/prestissimo 2016-05-12 07:44:15 -05:00
.github invalidate stale commits for PRs too 2018-10-09 14:32:52 +02:00
src/Symfony bug #27772 [Console] Fixes multiselect choice question defaults in non-interactive mode (veewee) 2018-10-12 09:06:41 -07:00
.appveyor.yml [appveyor] fix 2018-09-05 13:43:17 +02:00
.editorconfig Update .editorconfig 2018-09-06 16:22:56 +02:00
.gitignore Add appveyor.yml for C.I. on Windows 2015-08-25 23:41:37 +02:00
.php_cs.dist [CS] Enable phpdoc_types_order 2018-10-10 21:53:33 -03:00
.travis.yml [travis][appveyor] fix ter 2018-09-03 14:29:28 +02:00
CHANGELOG-2.2.md Merge branch '2.2' into 2.3 2013-12-03 15:51:26 +01:00
CHANGELOG-2.3.md updated CHANGELOG for 2.3.42 2016-05-30 10:40:50 +02:00
CHANGELOG-2.4.md updated CHANGELOG for 2.4.9 2014-09-03 11:50:09 +02:00
CHANGELOG-2.5.md updated CHANGELOG for 2.5.10 2015-02-02 10:26:02 +01:00
CHANGELOG-2.6.md updated CHANGELOG for 2.6.10 2015-07-13 11:34:21 +02:00
CHANGELOG-2.7.md updated CHANGELOG for 2.7.47 2018-05-21 13:47:41 +02:00
CHANGELOG-2.8.md updated CHANGELOG for 2.8.46 2018-09-30 05:51:35 +02:00
CODE_OF_CONDUCT.md Added the Code of Conduct file 2018-10-10 03:13:30 -07:00
composer.json Merge branch '2.7' into 2.8 2018-05-01 15:52:40 -07:00
CONTRIBUTING.md Mention the community review guide 2016-12-18 22:02:35 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 2.8.46 2018-09-30 05:52:49 +02:00
LICENSE fixed years in copyright 2018-01-03 08:23:28 +01:00
link Update Repository Symlink Helper 2018-02-11 12:15:02 +01:00
phpunit Default testsuite to latest PHPUnit 6.* 2018-05-25 15:04:04 +02:00
phpunit.xml.dist Merge branch '2.7' into 2.8 2017-04-12 07:07:15 -07:00
README.md Add code of Conduct links in our README 2018-05-25 16:34:01 +02:00
UPGRADE-2.1.md Remove aligned '=>' and '=' 2014-10-26 08:30:58 +01:00
UPGRADE-2.2.md Clean up 2018-01-02 16:37:23 +01:00
UPGRADE-2.3.md [Doc] Use Markdown syntax highlighting 2014-10-01 07:38:33 +02:00
UPGRADE-2.4.md Updated UPGRADE-2.4.md 2015-06-08 16:44:57 +02:00
UPGRADE-2.5.md Clean up 2018-01-02 16:37:23 +01:00
UPGRADE-2.6.md Fix grammar 2014-12-30 09:24:50 +01:00
UPGRADE-2.7.md Clean up 2018-01-02 16:37:23 +01:00
UPGRADE-2.8.md fixed CS 2017-08-10 08:50:59 +02:00
UPGRADE-3.0.md Add note about changed form processing when using PUT requests 2018-06-25 13:00:16 +02:00

Symfony is a PHP framework for web applications and a set of reusable PHP components. Symfony is used by thousands of web applications (including BlaBlaCar.com and Spotify.com) and most of the popular PHP projects (including Drupal and Magento).

Installation

Documentation

Community

Contributing

Symfony is an Open Source, community-driven project with thousands of contributors. Join them contributing code or contributing documentation.

Security Issues

If you discover a security vulnerability within Symfony, please follow our disclosure procedure.

About Us

Symfony development is sponsored by SensioLabs, led by the Symfony Core Team and supported by Symfony contributors.