Skip to content

Commit 647ca84

Browse files
committed
minor symfony#19106 [Console] [Question helper] Add more accuracy on multiple choices answers (devojifr)
This PR was merged into the 5.4 branch. Discussion ---------- [Console] [Question helper] Add more accuracy on multiple choices answers User can choose multiple answers by using string or index of the answer. Mixing string and int is even possible. Commits ------- 62080d2 [Question helper] Add more accuracy on multiple choices answers
2 parents aa817e1 + 62080d2 commit 647ca84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/console/helpers/questionhelper.rst

+2
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
185185

186186
Now, when the user enters ``1,2``, the result will be:
187187
``You have just selected: blue, yellow``.
188+
The user can enter string: ``blue,yellow`` as well or even mix string and
189+
the index of the choice like ``blue,2``.
188190

189191
If the user does not enter anything, the result will be:
190192
``You have just selected: red, blue``.

0 commit comments

Comments
 (0)