Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

MatTheCat
Copy link
Contributor

@MatTheCat MatTheCat commented Sep 8, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues N/A
License MIT

#61501 assumed multiline inputs were answers to multiline questions and suffixed them with an EOT character to mark their end.

But if you’re directly reading stdin, you can have line breaks without the need for an EOT: #61501 (comment)

Since the TesterTrait doesn’t know the inputs’ context, this PR reverts this behavior. Multiline questions will still be able to be tested by manually suffixing the answer with an EOT (x04) like in the added test.

Documentation PR: symfony/symfony-docs#21357

@MatTheCat MatTheCat requested a review from chalasr as a code owner September 8, 2025 10:41
@carsonbot carsonbot added this to the 7.4 milestone Sep 8, 2025
@MatTheCat MatTheCat changed the base branch from 7.4 to 6.4 September 8, 2025 10:42
@nicolas-grekas nicolas-grekas modified the milestones: 7.4, 6.4 Sep 8, 2025
@symfony symfony deleted a comment from carsonbot Sep 8, 2025
@nicolas-grekas
Copy link
Member

Thank you @MatTheCat.

@nicolas-grekas nicolas-grekas merged commit 00934e2 into symfony:6.4 Sep 8, 2025
9 of 10 checks passed
@MatTheCat MatTheCat deleted the opt_in_eot branch September 8, 2025 12:52
nicolas-grekas added a commit that referenced this pull request Sep 8, 2025
…th an EOT (MatTheCat)

This PR was merged into the 6.4 branch.

Discussion
----------

[Console] Don’t append a new line to test inputs ending with an EOT

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | N/A
| License       | MIT

#61501 wrote a new line before multiline test inputs’ EOT character, and #61690 wrote it after… so the next input would always be empty.

This PR doesn’t write a new line if a test input ends with `\x4` so that the stream matches the inputs.

Commits
-------

74ae155 [Console] Don’t append a new line to test inputs ending with an EOT
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Sep 9, 2025
…wer (MatTheCat)

This PR was submitted for the 7.3 branch but it was merged into the 6.4 branch instead.

Discussion
----------

[Console] Mention how to test a multiline question’s answer

symfony/symfony#61690 follow-up

Commits
-------

4545c5a [Console] Mention how to test a multiline question’s answer
This was referenced Sep 27, 2025
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.