IMPORTANT: This release contains breaking changes. Please read and follow the Upgrade guide in the wiki carefully before upgrading!
This release includes all improvements and bugfixes from PHPCompatibility 10.0.0-alpha1 and 10.0.0-alpha2.
See all related issues and PRs in the 10.0.0-alpha3 milestone.
Added
- PHP 8.5:
- 🌟 New
PHPCompatibility.ControlStructures.RemovedTerminatingCaseWithSemicolonsniff. #2014
- 🌟 New
- PHP 8.6:
- 🌟 New
PHPCompatibility.ControlStructures.RemovedReturnFromFinallysniff. #2063 - 🌟 New
PHPCompatibility.FunctionDeclarations.RemovedReturnYieldInConstructDestructsniff. #2064 - 🌟 New
PHPCompatibility.FunctionNameRestrictions.NewDebuggableEnumssniff. #2067 - 🌟 New
PHPCompatibility.ParameterValues.NewTrimCharactersDefaultsniff. #2068 - 🌟 New
PHPCompatibility.ParameterValues.RemovedIsASubclassOfAllowStringFalsesniff. #2078
- 🌟 New
- ⭐
PHPCompatibility.ParameterValues.NewPackFormatsniff: detect usage of the endianness modifiers for integers and floats as introduced in PHP 8.6. #2071 - ⭐
PHPCompatibility.TypeCasts.NewTypeCastssniff: detect usage of the(void)type cast which was introduced in PHP 8.5. #2050 - ⭐
IMAGETYPE_AVIF(PHP 8.1),IMAGETYPE_HEIF(PHP 8.5) andT_VOID_CAST(PHP 8.5) to the constants detected via thePHPCompatibility.Constants.NewConstantssniff. #2022, #2050 - ⭐ Various "list based" sniffs, like
NewFunctions,RemovedIniDirectives,ForbiddenNamesetc, have received updates to account for new/deprecated/removed PHP keywords, classes, constants, functions, function parameters, ini directives and reserved namespaces as per PHP 8.6. - 📚 Documentation for the following sniffs:
- PHPCompatibility.Classes.NewClasses #2097
- PHPCompatibility.Classes.NewTypedProperties #2001
- PHPCompatibility.Constants.NewConstants #2097
- PHPCompatibility.FunctionDeclarations.NewTrailingComma #2016
- PHPCompatibility.FunctionUse.NewFunctions #2097
- PHPCompatibility.Interfaces.NewInterfaces #2097
- PHPCompatibility.Syntax.NewArrayUnpacking #2021
- PHPCompatibility.Syntax.NewFunctionCallTrailingComma #2018
- PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess #2002
Changed
- 📌 The
PHPCompatibility.ParameterValues.NewPackFormatsniff will now also detect the new format codes when used with theunpack()function. #2060 - ✏️
PHPCompatibility.Keywords.ForbiddenNames: minor improvements to the error message texts. #2055 - 🔧 ☔ Various housekeeping, including general maintenance, improvements to speed up the sniffs, code modernizations, improvements to CI, the tests and documentation.
Removed
- 🚫 Support for PHP < 7.2. #2003
- 🚫 Support for PHP_CodeSniffer < 4.0.2. #2009, #2014, #2045
- 🚫
PHPCompatibility.Upgrade.LowPHPsniff. #2003 - 🚫
PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.ASPOpenTagFounderror code. #2003
Potentially detected ASP open tags will now always be reported under theMaybeASPOpenTagFounderror code.
Fixed
- 🐛 PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess: false positive on PHP 8.4 property hook declarations. #2026
Credits
Thanks go out to @rodrigoprimo and @okkun-sh for their contributions to this version. 👏