Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default #28401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2018

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Sep 8, 2018

Q A
Branch? 2.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #26885
License MIT
Doc PR n/a

There is an inconsistency between SymfonyStyle::askQuestion(new ChoiceQuestion(...)) and SymfonyStyle::choice(...), the former does not support to have a choice value as default instead of a choice key while the latter handles both.
This is causing an undefined index notice breaking interactive command testing, fixed here.

@chalasr chalasr added this to the 2.8 milestone Sep 8, 2018
Gemorroj added a commit to Gemorroj/console-phar-example that referenced this pull request Sep 8, 2018
@chalasr chalasr changed the title [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value … [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default Sep 8, 2018
@chalasr chalasr merged commit c51dda0 into symfony:2.8 Sep 8, 2018
chalasr pushed a commit that referenced this pull request Sep 8, 2018
…oice value as default (chalasr)

This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26885
| License       | MIT
| Doc PR        | n/a

There is an inconsistency between `SymfonyStyle::askQuestion(new ChoiceQuestion(...))` and `SymfonyStyle::choice(...)`, the former does not support to have a choice value as default instead of a choice key while the latter handles both.
This is causing an `undefined index` notice breaking interactive command testing, fixed here.

Commits
-------

c51dda0 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
@chalasr chalasr deleted the sfstyle-choice-val branch September 8, 2018 18:52
This was referenced Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants