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 OutputStream for PHP 7.4#36222
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
Uh oh!
There was an error while loading.Please reload this page.
711c873 to703266aCompareUh oh!
There was an error while loading.Please reload this page.
| */ | ||
| protectedfunctiondoWrite($message,$newline) | ||
| { | ||
| $message = (string)$message; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It's not related to the fix, I'm going to revert this change while merging the PR.
8f9d015 tob375f93Comparefabpot commentedMar 27, 2020
Thank you@guillbdx. |
HarasimowiczKamil commentedApr 7, 2020 • 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.
xabbuh commentedApr 12, 2020
@HarasimowiczKamil Symfony 4.3 does not receive bugfixes anymore (seehttps://symfony.com/releases/4.3). |
Uh oh!
There was an error while loading.Please reload this page.
From PHP 7.4,
fwritefunction now returns false for any failure:https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.fread-fwriteActually, the note in the PHP documentation is not exact: for PHP 7.3 and lower,
fwritefunction did return false when arguments passed in to the function were invalid, and 0 for other failures. From PHP 7.4, it returns false for any failure.We can see it in the source code: for PHP 7.3:https://github.com/php/php-src/blob/a1a8d144854acb1c891cf0c21abb0f612b1d8de7/ext/standard/file.c#L1140
Compare to PHP 7.4:https://github.com/php/php-src/blob/master/ext/standard/file.c#L1136
I update
OutputStream::doWrite()to keep the same behavior as before.