PHP 5.4: New PHPCompatibility.ParameterValues.ChangedObStartEraseFlags sniff#1027
Merged
PHP 5.4: New PHPCompatibility.ParameterValues.ChangedObStartEraseFlags sniff#1027
PHPCompatibility.ParameterValues.ChangedObStartEraseFlags sniff#1027Conversation
faaf6be to
fd5518e
Compare
PHPCompatibility.ParameterValues.ChangedObStartEraseFlags sniffPHPCompatibility.ParameterValues.ChangedObStartEraseFlags sniff
…lags` sniff From: https://www.php.net/manual/en/function.ob-start.php#refsect1-function.ob-start-changelog > The third parameter of ob_start() changed from a boolean parameter called erase > (which, if set to FALSE, would prevent the output buffer from being deleted until > the script finished executing) to an integer parameter called flags. > Unfortunately, this results in an API compatibility break for code written prior to > PHP 5.4.0 that uses the third parameter. This sniff addresses that change. Includes unit tests.
fd5518e to
055b408
Compare
wimg
approved these changes
May 20, 2020
| ob_start($output_callback, $chunk_size, true); | ||
| ob_start($output_callback, $chunk_size, false); | ||
|
|
||
| // Not OK - error PHP >= 5.4. |
Member
There was a problem hiding this comment.
Shouldn't this be < 5.4 since this should be an issue when used on PHP < 5.4 ? And the inverse above ?
Member
Author
There was a problem hiding this comment.
Yes, you're right. I've put the fix in a WIP "minor doc fixes" branch which I'll pull before the release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From: https://www.php.net/manual/en/function.ob-start.php#refsect1-function.ob-start-changelog
This sniff addresses that change.
Includes unit tests.