PHP 8 support#142
Merged
Merged
Conversation
Member
|
@edudobay thank you for this. Let's go with the same roadmap we agreed to on the main Slim repo. When all the official releases come out we can make the appropriate changes to support 8.0 |
1. Allow PHPUnit 9 (needed for PHP 8) 2. Shim deprecated libxml functions Make the call to libxml_disable_entity_loader conditional. This function has been deprecated in PHP 8.0 and the new default is equivalent to calling that function with `true`. https://php.watch/versions/8.0/libxml_disable_entity_loader-deprecation Note: there were two instances of exactly the same XML-parsing anonymous function. I've traced this duplication back to 2015 when the functions were one line long and explicitness might have been better than deduplication. Over the years these functions have been growing together and I see no obvious reason why two copies should be maintained.
Contributor
Author
|
All set for this one! All dependencies have been released with PHP 8.0 support. |
l0gicgate
approved these changes
Nov 20, 2020
Member
|
Fantastic, thank you for your contributions @edudobay! |
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.
This PR allows Slim to be installed in PHP 8 and passes all the tests and checks.
See also slimphp/Slim#3015 and slimphp/Slim-Psr7#169 for corresponding changes.
The same questions apply here:
disableXmlEntityLoaderas aprivate static method. Is this okay? I thought about making itprotectedor extracting it to a class, but I'm unsure about creating new "contracts".libxml_disable_entity_loader. Is it okay to just@codeCoverageIgnoresome part that will only run in PHP 7 or PHP 8? How should situations like this be handled?Dependencies: all dependencies have PHP 8-compatible releases now!