Skip to content

Commit c8dd85f

Browse files
committed
minor #19104 [Question helper] Add more accuracy on possible answers (devojifr)
This PR was merged into the 5.4 branch. Discussion ---------- [Question helper] Add more accuracy on possible answers Question helper has a default regex starting with `y`, so the user can answer with any expression like `yeti` to confirm the action. Commits ------- ba5b823 [Question helper] Add more accuracy on possible answers
2 parents 28b86de + ba5b823 commit c8dd85f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/console/helpers/questionhelper.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ the following to your command::
5252
}
5353

5454
In this case, the user will be asked "Continue with this action?". If the user
55-
answers with ``y`` it returns ``true`` or ``false`` if they answer with ``n``.
55+
answers with ``y`` (or any word, expression starting with ``y`` due to default answer regex, e.g ``yeti``) it returns ``true`` or ``false`` otherwise, e.g. ``n``.
56+
5657
The second argument to
5758
:method:`Symfony\\Component\\Console\\Question\\ConfirmationQuestion::__construct`
5859
is the default value to return if the user doesn't enter any valid input. If

0 commit comments

Comments
 (0)