PHP 8.4: Implicitly nullable parameter declarations deprecated#207
Open
PHP 8.4: Implicitly nullable parameter declarations deprecated#207
Conversation
Fix using Zf1s\Compat\Types
bb2943d to
4afbcd2
Compare
Contributor
|
This is a tricky one. If I understand correctly, we can not make 8.4 happy whilst supporting less than 7.1. This seems to prevent a conflict between keeping ZF1 usable on new PHP versions with this package and fixing vulnerabilities with it. The approach taken here makes me a little nervous but it does seem to perform what we want:
It does introduce a surprising pattern though. Is that preferable to making future version >=7.1? |
Contributor
Author
|
@dmnc No actually in the end I managed to make it work on all versions 5.6-8.4. I had to introduce a helper function though, because there is no syntax that would work in both 5.6 and 8.4. |
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.
PHP 8.4: Implicitly nullable parameter declarations deprecated
https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated
Fixes error:
Implicitly marking parameter ? as nullable is deprecated, the explicit nullable type must be used instead
Fix using Zf1s\Compat\Types