Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] Fix testing multiline question#61501
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
MatTheCat commentedAug 22, 2025
| Q | A |
|---|---|
| Branch? | 6.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Issues | Fix#58910 |
| License | MIT |
Thank you@MatTheCat. |
5c143ba intosymfony:6.4Uh oh!
There was an error while loading.Please reload this page.
DaveLiddament commentedSep 8, 2025
FYI: This update has caused a number of my test to fail (see:DaveLiddament/sarb#152) . All my tests passed again when downgrading just the symfony/console package from 6.4.25 to 6.4.24. The problem I encountered is the addition of the EOT character ( In order to make my tests pass, I have to add in some code the removes the trailing EOT character (if it exists). As far as I can tell (my package has been used for 7 years) this character does not exist in real applications. If you want to explore this more, then I can try and put together a small reproducer. PS: Thanks to all the Symfony team and contributors for creating such an amazing framework. |
Thanks for the feedback@DaveLiddament, the I guess it should be the developer responsibility to add this character then; will open a PR. |
… inputs (MatTheCat)This PR was squashed before being merged into the 6.4 branch.Discussion----------[Console] Don’t automatically append EOT to multiline test inputs| 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.If it is accepted it’ll be followed by a doc PR.Commits-------938fabb [Console] Don’t automatically append EOT to multiline test inputs
…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