Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[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

Merged

Conversation

@guillbdx
Copy link

@guillbdxguillbdx commentedMar 26, 2020
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#36166
LicenseMIT

From PHP 7.4,fwrite function now returns false for any failure:https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.fread-fwrite

Actually, the note in the PHP documentation is not exact: for PHP 7.3 and lower,fwrite function 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 updateOutputStream::doWrite() to keep the same behavior as before.

aivus and mitoop reacted with thumbs up emoji
@nicolas-grekasnicolas-grekas changed the title[Console] Fix OutputSream for PHP 7.4[Console] Fix OutputStream for PHP 7.4Mar 26, 2020
*/
protectedfunctiondoWrite($message,$newline)
{
$message = (string)$message;
Copy link
Member

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.

@fabpotfabpotforce-pushed theconsole-fix-outputsream-php-7.4 branch from8f9d015 tob375f93CompareMarch 27, 2020 17:07
@fabpot
Copy link
Member

Thank you@guillbdx.

@fabpotfabpot merged commitb928089 intosymfony:3.4Mar 27, 2020
This was referencedMar 30, 2020
@HarasimowiczKamil
Copy link

HarasimowiczKamil commentedApr 7, 2020
edited
Loading

@guillbdx@fabpot Is there a chance to merge it to 4.3?

@xabbuh
Copy link
Member

@HarasimowiczKamil Symfony 4.3 does not receive bugfixes anymore (seehttps://symfony.com/releases/4.3).

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

7 participants

@guillbdx@fabpot@HarasimowiczKamil@xabbuh@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp