Implement 8.6 deprecations - #23074
Draft
Girgias wants to merge 7 commits into
Draft
Conversation
Fix tests using non canonical versions and improve existing tests. RFC: - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_double - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_integer - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_is_long - https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_doubleval
Sjord
reviewed
Aug 6, 2026
| } | ||
| if (Z_TYPE_P(filter_params) == IS_OBJECT) { | ||
| php_error_docref("filters.compression", E_DEPRECATED, | ||
| "Deprecated: Passing an object for filter parameters for bzip2.decompress is deprecated, call get_object_vars() first instead"); |
Contributor
There was a problem hiding this comment.
I don't think "Deprecated:" should be in the message here. This is prepended because a E_DEPRECATED error is generated. Now it says "Deprecated:" twice:
Deprecated: stream_filter_append(): Deprecated: ...
Sjord
reviewed
Aug 6, 2026
| ZVAL_STR(orig_var, ret); | ||
| } else if (Z_TYPE_P(var) == IS_ARRAY || Z_TYPE_P(var) == IS_OBJECT) { | ||
| if (Z_TYPE_P(var) == IS_OBJECT) { | ||
| php_error_docref(NULL, E_WARNING, |
Contributor
There was a problem hiding this comment.
Should this be E_DEPRECATED instead of E_WARNING?
Sjord
reviewed
Aug 6, 2026
| function nl_langinfo(int $item): string|false {} | ||
| #endif | ||
|
|
||
| #[\Deprecated(message: "Function strcoll() is deprecated, use Collator::compare() instead", since: "8.6")] |
Contributor
There was a problem hiding this comment.
It seems that the text "Function strcoll() is deprecated (since 8.6)" is generated elsewhere, and this should only contain "use Collator::compare() instead".
TimWolla
reviewed
Aug 6, 2026
| function floatval(mixed $value): float {} | ||
|
|
||
| /** @alias floatval */ | ||
| #[\Deprecated(message: "Function doubleval() is deprecated, use floatval() instead", since: "8.6")] |
Member
There was a problem hiding this comment.
Suggested change
| #[\Deprecated(message: "Function doubleval() is deprecated, use floatval() instead", since: "8.6")] | |
| #[\Deprecated(message: "use floatval() instead", since: "8.6")] |
The first part is implied. Ditto for the others.
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.
RFC: https://wiki.php.net/rfc/deprecations_php_8_6