-
Notifications
You must be signed in to change notification settings - Fork 24
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
PHP 8 support (closes #23) #26
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
Merged
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 updates the code to support PHP 8. Note that it's worked for everything I've tried on my local install, but it's definitely possible there are more problems lurking - feel free to open issues as you find them!
Categories of stuff fixed in this PR:
ClassName::instanceMethod()
) - this is mentioned here but I can't find the original deprecation notice. This has been deprecated for a while but now it returns an error. Made a bunch of methods static to fix this. In some cases a method was called with an instance syntax some places and a static syntax others, so I had to make two separate functions. (for example commit 7e768be)__construct()
- see deprecation notice. Another simple fix needed in a ton of places. This one was scarier because constructing an object would still work, but the constructor wouldn't be called, which would lead to unpredictable problems later on. I search and tried to make sure to find all of these. (for example commit c30f191)GalleryDynamicAlbum::createDynamicAlbum()
in commit 5aac894.create_function()
no longer works - see deprecation notice. Fix was to use anonymous functions instead. (for example commit 368b772)each()
no longer works - see deprecation notice. Fix was to useforeach
construct instead. (for example commit 6629937)a ? b : c
) used to be left-associative and you could nest them without parentheses; now parentheses are required - see deprecation notice. Fix was to add parentheses.I also fixed a few warnings that were cluttering up the debug output.