Skip to content

[Components][Console] Fix askConfirmation() description #3265

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

Merged
merged 2 commits into from
Dec 18, 2013
Merged

[Components][Console] Fix askConfirmation() description #3265

merged 2 commits into from
Dec 18, 2013

Conversation

bicpi
Copy link
Contributor

@bicpi bicpi commented Dec 3, 2013

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets -

askConfirmation() only terminates on entering y, n or nothing. API link added.

In this case, the user will be asked "Continue with this action?", and will
return ``true`` if the user answers with ``y`` or ``false`` if the user answers
with ``n``. The third argument to
:method:`Symfony\\Component\\Console\\Helper\\DialogHelper::askConfirmation`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to use the api link twice imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the first usage?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no prior usage.

@wouterj
Copy link
Member

wouterj commented Dec 3, 2013

It also works for 'yes' and 'no' afaik

@bicpi
Copy link
Contributor Author

bicpi commented Dec 3, 2013

Seems that everything starting with y or n will be evaluated to true or false respectively ($answer[0]).
Mh, I don't think this should be mentioned explicitly and it wasn't before.

See https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Console/Helper/DialogHelper.php#L219

weaverryan added a commit that referenced this pull request Dec 18, 2013
[Components][Console] Fix askConfirmation() description
@weaverryan weaverryan merged commit c753260 into symfony:2.2 Dec 18, 2013
@weaverryan
Copy link
Member

I like it, and agree that it's probably not really important that someone knows that yes/no and other combinations work. They want the user to be asked something, this explains that nicely.

Thanks everyone!

@bicpi bicpi deleted the fix_method_description branch January 5, 2014 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants