Skip to content
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

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

Merged
merged 1 commit into from Sep 8, 2018

Conversation

Projects
None yet
3 participants
@chalasr
Copy link
Member

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

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

chalasr added a commit that referenced this pull request Sep 8, 2018

bug #28401 [Console] Fix SymfonyQuestionHelper::askQuestion() with ch…
…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 chalasr:sfstyle-choice-val branch Sep 8, 2018

This was referenced Sep 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.