-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Labels
PHP: 8.1Status: to be implementedType: enhancementType: metaRepo strategy/structure relatedRepo strategy/structure related
Description
This is just an issue to keep track of which of the implemented RFCs for PHP 8.1 have been addressed.
This list should be updated when additional RFCs are accepted/implemented.
To Do
- Disable autovivification on false
- Deprecate implicit non-integer-compatible float to int conversions
- Deprecate passing null to non-nullable arguments of internal functions
- Array unpacking with string keys
- Change Default mysqli Error Mode
- Mysqli bind in execute
- Static variables in inherited methods
- Add return type declarations for internal methods
- Make reflection
setAccessible()no-op - Deprecations for PHP 8.1
Sub-list:
Aside from the RFCs, there are also the changes which were made outside of the RFC process and are listed in:
- The PHP 8.1 Upgrading guide.
Status: anything which relates to "list"-based sniffs has been accounted for and pulled. Still plenty more to review for scannability. - The PHP 8.0 to 8.1 Migration guide
- PHP 8.1 NEWS/Changelog
Status: reviewed for anything which PHPCompatibility should account for up to commit php/php-src@33cd61c dd Feb 23 2022. - Changelog
Claimed
- Deprecations for PHP 8.1
Sub-list:- Calling overloaded pgsql functions without the connection argument
Status: WIP/Needs to wait for PHPCSUtils alpha 4 named parameters support PR for theOptionalToRequiredFunctionParameterssniff to be pulled first
Owner: @jrfnl
- Calling overloaded pgsql functions without the connection argument
Has PR
- Pure intersection types - PR PHP 8.1 | Add support for and detection of intersection types in param, return and property types #1466 + PHP 8.1 | NewConstants/NewClasses: add new intersection related constants/classes (RFC) #1601
- Add IntlDatePatternGenerator - PR PHP 8.1 | NewClasses: account for PHP 8.1 changes #1328
- Enumerations - PRs PHP 8.0/8.1 | ForbiddenNames: detect use of new keywords when used as names #1415 (only ForbiddenNames) + PHP 8.1 | Various sniffs: detect enums and enum related features (RFC) #1604 (everything else)
- Add array_is_list(array $array): bool - PR PHP 8.1 | NewFunctions: account for PHP 8.1 changes #1325
- Explicit octal integer literal notation - PR ✨ PHP 8.1 | New
PHPCompatibility.Numbers.NewExplicitOctalNotationsniff #1420 - Restrict $GLOBALS usage - PR ✨ PHP 8.1: New PHPCompatibility.Variables.RemovedIndirectModificationOfGlobals sniff #1487 + ✨ PHP 8.1: New
PHPCompatibility.ParameterValues.NewArrayMergeRecursiveWithGlobalsVarsniff #1488 - Add fetch_column method to mysqli - PR PHP 8.1 | NewFunctions: account for PHP 8.1 changes #1325
- fsync() Function - PR PHP 8.1 | NewFunctions: account for PHP 8.1 changes #1325
- noreturn type - PR PHP 8.0/8.1 | ForbiddenNames: detect use of new keywords when used as names #1415 (ForbiddenNames) + PHP 8.1 | NewReturnTypeDeclarations: support
neverand verify standalone types #1458 - Fibers - PR PHP 8.1 | NewClasses: account for PHP 8.1 changes #1328 + PHP 8.1 | NewIniDirectives: account for PHP 8.1 changes #1329
- Phasing out Serializable - PR PHP 8.1: New PHPCompatibility.Interfaces.RemovedSerializable sniff #1330 + FunctionNameRestrictions/NewMagicMethods: special case the magic __[un]serialize() methods #1331
- Final class constants - PR PHP 8.1: New
PHPCompatibility.Classes.NewFinalClassConstantssniff #1317 + Classes/NewConstVisibility: account for PHP 8.1 final class constants #1318 - New in initializers - PR ✨ PHP 8.1: New
PHPCompatibility.InitialValue.NewNewInInitializerssniff #1464 + ✨ PHP 8.1: NewPHPCompatibility.InitialValue.NewNewInDefinesniff #1465 - Deprecations for PHP 8.1
Sub-list:- date_sunrise() and date_sunset() - PR PHP 8.1 | RemovedFunctions: account for PHP 8.1 changes #1321 + PHP 8.1 | RemovedIniDirectives: account for PHP 8.1 changes #1320
- mb_check_encoding() without argument - PR PHP 8.1: New
PHPCompatibility.ParameterValues.RemovedMbCheckEncodingNoArgssniff #1315 - FILE_BINARY and FILE_TEXT constants - PR PHP 8.1 | RemovedConstants: account for PHP 8.1 changes #1319
- strptime() - PR PHP 8.1 | RemovedFunctions: account for PHP 8.1 changes #1321
- strftime() and gmtstrftime() - PR PHP 8.1 | RemovedFunctions: account for PHP 8.1 changes #1321
- mhash*() function family - PR PHP 8.1 | RemovedFunctions: account for PHP 8.1 changes #1321
- Return by reference with void type - PR PHP 8.1: New
PHPCompatibility.FunctionDeclarations.RemovedReturnByReferenceFromVoidsniff #1316 - NIL constant defined by the IMAP extension - PR PHP 8.1 | RemovedConstants: account for PHP 8.1 changes #1319
- $num_points parameter of image(open|filled)polygon - PR PHP 8.1 | RemovedFunctionParameters: account for PHP 8.1 changes #1322
- filter.default ini setting - PR PHP 8.1 | RemovedIniDirectives: account for PHP 8.1 changes #1320
- auto_detect_line_endings ini setting - PR PHP 8.1 | RemovedIniDirectives: account for PHP 8.1 changes #1320
- FILTER_SANITIZE_STRING - PR PHP 8.1 | RemovedConstants: account for PHP 8.1 changes #1319
- oci8.old_oci_close_semantics ini setting - PR PHP 8.1 | RemovedIniDirectives: account for PHP 8.1 changes #1320
- odbc_result_all() - PR PHP 8.1 | RemovedFunctions: account for PHP 8.1 changes #1321
- First-class callable syntax - PR ✨ PHP 8.1: New
PHPCompatibility.Syntax.NewFirstClassCallablessniff #1425 - Readonly properties 2.0 - PR PHP 8.0/8.1 | ForbiddenNames: detect use of new keywords when used as names #1415 (ForbiddenNames) ✨ PHP 8.1: New
PHPCompatibility.Classes.NewReadonlyPropertiessniff #1426
Policy RFC:
Reviewed and concluded non-sniffable
- Deprecations for PHP 8.1
get_class(), get_parent_class() and get_called_class() without argumentRFC rejectedt fopen modeRFC rejected
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.1 comes out, individual issues should be opened for the changes which remain at that point in time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PHP: 8.1Status: to be implementedType: enhancementType: metaRepo strategy/structure relatedRepo strategy/structure related