Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #29844 [Console] Fixed #29835: ConfirmationQuestion with default …
…true for answer '0' (mrthehud) This PR was squashed before being merged into the 3.4 branch (closes #29844). Discussion ---------- [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0' | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | Almost all, one failure on appveyor? | Fixed tickets | #29835 | License | MIT | Doc PR | n/a <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> When using the ConfirmationQuestion class to ask a yes / no question, if the default is true, and the answer regex is '/^y/i', then any value not starting with [yY] is considered false. This must include "0", which previously would return true, producing results such as: ``` $ php bin/console do:stuff $ Do you want to continue? 0 <enter> $ Ok, continuing! ``` Commits ------- a0a7400d6f [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0'
- Loading branch information