-
Notifications
You must be signed in to change notification settings - Fork 104
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PHP 8 compatibility issues #84
Merged
Merged
Conversation
This file contains 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
This is no longer available in PHP 8, and generates an error on startup.
break and "continue 2" are the same in this case and the code mixes both. I'm using break here for simplicity.
Because it is called statically
This flag hasn't been supported since PHP 7, but more importantly it doesn't even apply to preg_match_all in the first place.
Also adjust one call to it, though this is not strictly necessary.
Also make calls to it static (not strictly necessary) and drop an object instantiation that becomes unnecessary due to that.
There are many non-static uses of that one, which I'm not touching. They aren't a problem.
@nikic this looks pretty good to me... I think I can do some sanity testing myself in a few hours. |
ashnazg
approved these changes
Feb 7, 2019
@nikic pearweb_phars updated with new release now too. |
@ashnazg Thanks! |
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.
This should be a comprehensive fix for all PHP 8 compatibility issues in pear-core. I believe that all the changes done here are both compatible with PHP 5.4 (minimum supported version by PEAR) and not BC breaking.
With this, all tests pass under PHP 8.
cc @ashnazg @torinaki