-
-
Notifications
You must be signed in to change notification settings - Fork 204
Description
This is just an issue to keep track of which of the implemented RFCs for PHP 8.5 have been addressed.
This list should be updated when additional RFCs are accepted/implemented.
To Do
- Clone with v2
- Support Closures in constant expressions
- First Class Callables in constant expressions
- Error backtraces v2
Review notes (@jrfnl): the added ini setting is handled (PR ??), however, I believe we can and should add an additional sniff too.
This sniff would need to look for calls toregister_shutdown_function()and if possible (function in same file, closure), find the registered function and examine whether that function callserror_get_last()in the function body and if so, flag that function call as the result oferror_get_last()in a shutdown function may now contain a backtrace, so any code examining the return value array oferror_get_last()may need updating. - Change Directory class to behave like a resource object
- Cookies Having Independent Partitioned State (CHIPS)
Review notes (@jrfnl): would probably be worth addressing together with PHP 7.3: detect same-site cookie / changes to session function signatures #726, which is a similar change in PHP 7.3. - Add RFC3986 and WHATWG URL compliant API
- Deprecations for PHP 8.4 [Mostly implemented in PHP 8.4]
Sublist: - Warnings for PHP 8.5
Note: these may not all be fully implemented yet! PRs to detect the deprecation will only be accepted after the deprecation has been merged into PHP Core.
Sublist: - Deprecations for PHP 8.5
Note: these may not all be fully implemented yet! PRs to detect the deprecation will only be accepted after the deprecation has been merged into PHP Core.
Sublist:- Language/syntax deprecations
-
Deprecate the __sleep() and __wakeup() magic methods - __wakeup PR, __sleep PR(superseded) - Deprecate using values null as an array offset and when calling array_key_exists() - PR - commit
- Deprecate constant redeclaration - PR - commit
- Deprecate Closure binding issues - PR - commit
- Enact follow-up phase of the “Path to Saner Increment/Decrement operators” RFC - PR - commit
-
- ext/reflection deprecations
- ext/spl deprecations
- ext/standard deprecations
- ext/odbc deprecations
- ext/pdo deprecations
- Deprecate building ext/ldap against Oracle LDAP - PR - commit
- Language/syntax deprecations
Aside from the RFCs, there are also the changes which were made outside of the RFC process and are listed in:
- The PHP 8.5 Upgrading guide.
- The PHP 8.4 to 8.5 Migration guide (once available)
- PHP 8.5 NEWS/Changelog
- Changelog
Claimed
- Soft-Deprecate __sleep() and __wakeup()
Replaces Deprecate the __sleep() and __wakeup() magic methods from the "Deprecations for 8.5' RFC.
Status: WIP
Owner: @afilina - #[\Deprecated] for traits - PR - commit
Status: Todo - needs a good think about how we should handle attributes which can only be applied to specific type of constructs and not all constructs attributes can be applied to. Also see Further improve attribute detection/flagging #1935
Owner: @jrfnl - #[\DelayedTargetValidation] attribute
Status: TODO / needs a good think, see Further improve attribute detection/flagging #1935
Owner: @jrfnl - Final Property Promotion
Status: WIP
Owner: @jrfnl - Pipe operator
Status: Needs tokenizer support in PHPCS
Owner: @jrfnl - Attributes on Constants
Status: Needs PHPCSUtils 1.2.0
Owner: @jrfnl - Marking return values as important (#[\NoDiscard])
Status: TODO / needs a good think, see Further improve attribute detection/flagging #1935
Owner: @jrfnl - Extend #[\Override] to target properties
Status: TODO / needs a good think, see Further improve attribute detection/flagging #1935
Owner: @jrfnl - Deprecations for PHP 8.5
Sublist:- Language/syntax deprecations
- Deprecate __debugInfo() returning null - PR - commit
Status: WIP
Owner: @jrfnl
- Deprecate __debugInfo() returning null - PR - commit
- ext/standard deprecations
- Deprecate the $http_response_header predefined variable - PR - commit
Status: WIP
Owner: @jrfnl
- Deprecate the $http_response_header predefined variable - PR - commit
- Language/syntax deprecations
Additionally, an initial scan of UPGRADING file for additional list-based updates to be made is ongoing and owned by @jrfnl.
Has PR
- Add locale for case insensitive grapheme functions - PR PHP 8.5 | NewFunctionParameters: detect use of grapheme_*() $locale (RFC) #1947
- FILTER_THROW_ON_FAILURE - PR PHP 8.5 | NewConstants/Classes: handle FILTER_THROW_ON_FAILURE addition (RFC) #1953
- Grapheme cluster for levenshtein, grapheme_levenshtein function - PR PHP 8.5 | NewFunctions: detect new grapheme_levenshtein() function (RFC) #1967
- Asymmetric Visibility for Static Properties - PR PHP 8.5 | ✨ New
PHPCompatibility.Classes.NewStaticAvizPropertiessniff (RFC) #1950 - Add get_error_handler(), get_exception_handler() functions - PR PHP 8.5 | NewFunctions: detect new error handler functions (RFC) #1969
- Persistent curl share handle improvement - PR PHP 8.5 | NewClasses/Functions: handle curl_share_init_persistent() addition (RFC) #1962
- Error backtraces v2 - PR PHP 8.5 | NewIniDirectives: detect new fatal_error_backtraces ini directive (RFC) #1946
Also see review notes in "To Do" section. - array_first() and array_last() - PR PHP 8.5 | NewFunctions: detect new array functions (RFC) #1970
- Deprecations for PHP 8.5
Sublist:- Language/syntax deprecations
- Deprecate semicolon after case in switch statement - PR - commit - PR PHP 8.5 | ✨ New
PHPCompatibility.ControlStructures.RemovedTerminatingCaseWithSemicolonsniff (RFC) #2014 - Deprecate non-standard cast names - PR - commit - PR PHP 8.5 | TypeCasts/RemovedTypeCasts: detect newly deprecated type casts (RFC) #1941
- Deprecate backticks ` as an alias for shell_exec - PR - commit - PR ✨ New
PHPCompatibility.LanguageConstructs.RemovedLanguageConstructssniff (RFC) #1948
- Deprecate semicolon after case in switch statement - PR - commit - PR PHP 8.5 | ✨ New
- Core INI directive deprecations
- Deprecate the report_memleaks INI directive - PR - commit - PR PHP 8.5 | RemovedIniDirectives: detect use of report_memleaks (RFC) #1942
- Deprecate the register_argc_argv INI directive - PR - commit - PR PHP 8.5 | RemovedIniDirectives: detect use of register_argc_argv (RFC) #1954
- Remove the disable_classes INI setting - PR - commit - PR PHP 8.5 | RemovedIniDirectives: detect use of disable_classes (RFC) #1959
- ext/standard deprecations
- Deprecate the $exclude_disabled parameter of get_defined_functions() - PR - commit - PR PHP 8.5 | RemovedFunctionParameters: detect use of get_defined_functions() $exclude_disabled (RFC) #1944
- Formally deprecate socket_set_timeout() - PR - commit - PR PHP 8.5 | RemovedFunctions: detect use of socket_set_timeout() (RFC) #1943
- Deprecate no-op functions from the resource to object conversion
- Deprecate finfo_close() - PR - commit - PR PHP 8.5 | RemovedFunctions: detect use of deprecated no-op functions (RFC) #1955
- Deprecate xml_parser_free() - PR - commit - PR PHP 8.5 | RemovedFunctions: detect use of deprecated no-op functions (RFC) #1955
- Deprecate curl_close() - PR - commit - PR PHP 8.5 | RemovedFunctions: detect use of deprecated no-op functions (RFC) #1955
- Deprecate curl_share_close() - PR - commit - PR PHP 8.5 | RemovedFunctions: detect use of deprecated no-op functions (RFC) #1955
- Deprecate imagedestroy() - PR - commit - PR PHP 8.5 | RemovedFunctions: detect use of deprecated no-op functions (RFC) #1955
- Deprecate key_length parameter of openssl_pkey_derive() - PR - commit - PR PHP 8.5 | RemovedFunctionParameters: detect use of openssl_pkey_derive() $key_length (RFC) #1956
- Deprecate intl.error_level INI setting - PR - commit - PR PHP 8.5 | RemovedIniDirectives: detect use of intl.error_level (RFC) #1965
- Formally deprecate mysqli_execute() - PR - commit - PR PHP 8.5 | RemovedFunctions: detect use of mysqli_execute() (RFC) #1960
- Deprecate the $context parameter for finfo_buffer() - PR - commit - PR PHP 8.5 | RemovedFunctionParameters: detect use of finfo_buffer() $context (RFC) #1961
- Deprecate DATE_RFC7231 and DateTimeInterface::RFC7231 - PR - commit - PR PHP 8.5 | RemovedConstants: detect use of DATE_RFC7231 (RFC) #1945
- Language/syntax deprecations
Reviewed and concluded non-sniffable
- Make OPcache a non-optional part of PHP
Reviewed by @jrfnl and concluded there is nothing sniffable about the RFC. - Deprecations for PHP 8.5
- Language/syntax deprecations
Deprecate attributes applying to multiple class properties/constantsRFC rejected
- ext/reflection deprecations
Deprecate ReflectionParameter::allowsNull()RFC rejected
- ext/standard deprecations
Deprecate non-canonical type names for settype()RFC rejected
- ext/filter deprecations
Deprecate FILTER_DEFAULT constantRFC rejectedMake $filter parameter mandatory for filter_*() functionsRFC rejected
- ext/pdo deprecations
Deprecate PDO::ERRMODE_WARNING error modeRFC rejected
- Language/syntax deprecations
- Warnings for PHP 8.5 (Voting started 2025-07-29, ends 2025-08-12)
Delayed to later PHP version
Nothing
Status yet to be determined
These are RFCs which have either not yet been implemented or are still in voting at this time.
Once their final status for PHP 8.5 is determined, they will either be moved to the "To Do" list or removed from this ticket.
Accepted, not yet (fully) implemented
Feature freeze is in effect. Anything which didn't make it in yet, is delayed to a future PHP version.
In voting
All votes have been closed
Process
If anyone starts work on updating PHPCompatibility to handle any of these issues, please either update the above list (if you can) or leave a comment below, so one of the maintainers can update the list.
Once PHP 8.5 comes out, individual issues should be opened for the changes which remain at that point in time.
Guidelines
- When in doubt how to address something and/or if your approach is the right one: ask.
This also means that it is perfectly acceptable to open an dedicated issue to discuss a particular change in more detail. - PRs which address RFCs should only contain the changes for one RFC per PR. One RFC may warrant multiple PRs depending on the nature of the changes.
Exception: when a RFC builds onto a previous RFC, combining the necessary changes into one PR addressing the cumulative changes to PHP is fine. - PRs not directly related to RFCs may address multiple changes in one go, as long as the changes are logically closely related (like adding a range of new constants to be detected).
- Please include relevant change justification and links in each commit message.
Typically this means that a commit message should include:- Text snippet from the PHP
UPGRADINGguide/changelog/migration guide or the RFC to back up the change being made. - A link to the RFC (if applicable).
- A link to the exact
UPGRADINGguide/changelog/migration guide section which documents the change in PHP Core. - A link to the PR to PHP Core which proposed the change (if applicable).
- A link to the commit which added the change to PHP Core.
- Text snippet from the PHP
- Changes which were proposed/accepted for PHP, but have not been merged into PHP Core yet, should not be detected by PHPCompatibility (yet).
The commit to PHP Core should always come first, PHPCompatibility follows.