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] Fixed #29835: ConfirmationQuestion with default true for answer '0' #29844

Open
wants to merge 2 commits into
base: 3.4
from

Conversation

Projects
None yet
4 participants
@mrthehud
Copy link
Contributor

mrthehud commented Jan 11, 2019

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

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!
@ro0NL

ro0NL approved these changes Jan 11, 2019

@chalasr chalasr added this to the 3.4 milestone Jan 11, 2019

mrthehud added some commits Jan 11, 2019

[Console] Fixed #29835: ConfirmationQuestion with default true for an…
…swer '0'

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"

@mrthehud mrthehud force-pushed the mrthehud:issue-29835 branch from 324b512 to ca6690a Jan 11, 2019

@mrthehud

This comment has been minimized.

Copy link
Contributor

mrthehud commented Jan 11, 2019

That Appveyor test that's failing looks completely unrelated, and passes locally. Any ideas chaps?

@chalasr

This comment has been minimized.

Copy link
Member

chalasr commented Jan 11, 2019

@mrthehud that's unrelated indeed, don't worry about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment