Skip to content

[Console] Fix wrong quotes in QuestionHelper::setInputStream() #6644

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 1 commit into from
Jun 11, 2016

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Jun 9, 2016

As pointed by this Stack Overflow question, the code example showing how to test a command that interacts with the user is wrong.

The reason is that \n between simple quotes are not considered as break lines in PHP, even escaped with an additional \.

@javiereguiluz
Copy link
Member

👍 @chalasr nice catch and a quick win. Thanks!

@javiereguiluz
Copy link
Member

Status: Reviewed

@xabbuh xabbuh merged commit 5679e2d into symfony:2.7 Jun 11, 2016
xabbuh added a commit that referenced this pull request Jun 11, 2016
…eam() (chalasr)

This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix wrong quotes in QuestionHelper::setInputStream()

As pointed by [this Stack Overflow question](http://stackoverflow.com/questions/37709966/symfony-interactive-command-test-ends-with-runtimeexception/37712073), the code example showing how to test a command that interacts with the user is wrong.

The reason is that `\n` between simple quotes are [not considered as break lines](http://stackoverflow.com/questions/2531969/print-newline-in-php-in-single-quotes) in PHP, even escaped with an additional `\`.

Commits
-------

5679e2d Fix wrong quotes in QuestionHelper::setInputStream()
@xabbuh
Copy link
Member

xabbuh commented Jun 11, 2016

Thank you @chalasr for fixing an issue you noticed while helping someone on StackOverflow. This is how a great community works. 🎉

@chalasr
Copy link
Member Author

chalasr commented Jun 11, 2016

@javiereguiluz @xabbuh Thank you for consider it, always a pleasure to participate.

@chalasr chalasr deleted the fix_questionhelper_setinputstream branch June 11, 2016 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants