Open
Conversation
This removes the deprecations introduced in PHP 8.4
PHP 8.4 makes not doing so a deprecation.
PHP 8.4 deprecates the use of E_USER_ERROR. This can mangle the exception thrown. So, skip the test in PHP 8.4. It may be possible to fix up what's being thrown, but I haven't found anything. Since using trigger_error for user errors is now deprecated, error_to_exception() should probably be deprecated as well. But that's a greater decision than making sure tests work correctly.
PHP 8.4 has changed the format of __FUNCTION__ for closures, at least.
PHP 8.4 deprecates the implicit conversion from doubles to ints when doing so would lose precision. However, disallowing doubles as array keys in Functional would be a BC break.
Author
|
Incidentally, I made these changes against the 1.17.0 release rather than main. I'll be maintaining my fork until PHP 8.4 support is merged, as I will be going to production with 8.3 (at least) soon. |
Owner
|
Looks good! Care to extend the build matrix for CI as well? |
lstrojny
reviewed
Dec 12, 2024
| InvalidArgumentException::assertValidArrayKey($groupKey, __FUNCTION__); | ||
|
|
||
| // Avoid implicit precision-loss from doubles (which cannot be keys) | ||
| if (is_numeric($groupKey)) { |
Owner
There was a problem hiding this comment.
Can you add a testcase for this so that we have the behavior explicitly pinned down?
lstrojny
reviewed
Dec 12, 2024
| } | ||
|
|
||
| $origFn = function () { | ||
| \trigger_error('Some error', E_USER_ERROR); |
Owner
There was a problem hiding this comment.
How about using E_DEPRECATED instead
|
is there any info when new version will be released with support of php 8.4? |
|
no, but you can use my PR. I work with itОтправлено с iPhone7 февр. 2025 г., в 19:50, Sergey Khrystenko ***@***.***> написал(а):
is there any info when new version will be released with support of php 8.4?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
|
@redbeardcreator any chance you'll be able to address the comments by @lstrojny? so he can finally merge the PR and release a new version 😄 |
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 is in response to my bug report, #254 . However, it technically also "competes" with:
I believe this is more thorough than either of the other two PRs. And it answers Several parameters are implicitly nullable, triggering deprecation warnings in PHP 8.4 #254 and then some.
I made these changes before I knew about the other two. But I'm tired and want to get this PR in. If desired, I'm happy to do the work of merging the other PRs together so everyone gets credit.