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 Windows code page support#41113
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedMay 5, 2021
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
chalasr commentedMay 6, 2021
Thanks for the PR. |
orkan commentedMay 6, 2021
Well, at first I was thinking the same as the PR guide says all bug fixes should adress 4.4 branch, but here I'm fixing a method that was introduced later in 352aed3 |
chalasr commentedMay 6, 2021
Ok got it, yet this patch changes somethig that exists on 4.4: symfony/src/Symfony/Component/Console/Helper/QuestionHelper.php Lines 111 to 114 inbeca689
So I guess we need an equivalent PR for 4.4. It'd be great if you could submit one. Otherwise, no worries, someone else will do (maybe me). Also, can you fix the CS issues reported by fabbot (see failing CI builds)? |
orkan commentedMay 6, 2021
I think this is beyond my knowledge of git, but applying this fix against 4.4 will result in conflicts with 352aed3 changes... An equivalent would be to not change anything ;) Btw, I fixed CS issues but why fabbot wants me to remove these lines? |
Nyholm commentedMay 6, 2021
If Fabbot suggest to do CS fix on a unrelated line, you should just ignore it. |
orkan commentedMay 6, 2021
It's actually related but where's the problem? Should I add description to the returned string? |
Uh oh!
There was an error while loading.Please reload this page.
chalasr commentedMay 6, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Symfony omits some annotations ( |
orkan commentedMay 6, 2021
OK. Got it! Thanks |
nicolas-grekas commentedMay 7, 2021
Thank you@orkan. |
This PR was submitted for the 5.x branch but it was merged into the 5.2 branch instead.Discussion----------[Console] Fix Windows code page supportMy previous PR#41113 was corrected by `@nicolas`-grekas on3bac7fe. He introduced logical changes in the code which resulted in incorrect behaviour.The basic idea was to restore the I/O codepage as soon as you get console input. And you have to do this even if `fgets()` returns **false**, because otherwise you'll leave the changed codepage for the rest of the script execution - and that's bad!Commits-------044b585 [Console] Fix Windows code page support
nicolas-grekas commentedMay 11, 2021
PR for 4.4 welcome btw! |
Nyholm commentedMay 11, 2021
orkan commentedMay 11, 2021
Hi@Nyholm. |
Nyholm commentedMay 12, 2021
Of course. Normally, bug fixes are merged in 4.4 (or the lowest branch they exists in). Every few days we merge 4.4 -> 5.2 -> 5.x.
I dont understand. We should create a PR to 4.4 to add
Could you elaborate how they are incompatible? I dont really understand. |
orkan commentedMay 13, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ok. Nevermind. I pushed fix#41210 for 4.4. "I am going to sit back now and..." see what will be the result code after 4.4 > 5.2 |
nicolas-grekas commentedMay 13, 2021
Resolving merge conflicts is our maintainer's duty. This one was easy ;) |
Corrects previous fixes that dealt with the mojibake problem on Windows where an OEM code page was applied to an input string and then messed with PHP.internal_encoding setting used by the script. This caused strings with different encodings to be displayed on the console output.