Skip to content

Commit

Permalink
Use a valid key as the default
Browse files Browse the repository at this point in the history
This is how the QuestionHelper API was intended to be used, but it only
has been so since a recent bugfix.
See symfony/symfony#25521
Fixes #1151
  • Loading branch information
greg0ire committed May 21, 2018
1 parent 8fd30e8 commit 7581001
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -18,7 +18,7 @@
"ext-mbstring": "*",
"behat/gherkin": "^4.5.1",
"behat/transliterator": "^1.2",
"symfony/console": "~2.5||~3.0||~4.0",
"symfony/console": "~2.7.40||^2.8.33||~3.3.15||^3.4.3||^4.0.3",
"symfony/config": "~2.3||~3.0||~4.0",
"symfony/dependency-injection": "~2.1||~3.0||~4.0",
"symfony/event-dispatcher": "~2.1||~3.0||~4.0",
Expand Down
Expand Up @@ -70,7 +70,7 @@ public function guessTargetContextClass(ContextEnvironment $environment)

$message = $this->translator->trans('snippet_context_choice', array('%1%' => $suiteName), 'output');
$choices = array_values(array_merge(array('None'), $contextClasses));
$default = current($contextClasses);
$default = 1;

$answer = $this->askQuestion('>> ' . $message, $choices, $default);

Expand Down

0 comments on commit 7581001

Please sign in to comment.