packagist phpcompatibility/php-compatibility 10.0.0-alpha3
10.0.0-alpha3 - 2026-11-17

3 hours ago

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.RemovedTerminatingCaseWithSemicolon sniff. #2014
  • PHP 8.6:
    • 🌟 New PHPCompatibility.ControlStructures.RemovedReturnFromFinally sniff. #2063
    • 🌟 New PHPCompatibility.FunctionDeclarations.RemovedReturnYieldInConstructDestruct sniff. #2064
    • 🌟 New PHPCompatibility.FunctionNameRestrictions.NewDebuggableEnums sniff. #2067
    • 🌟 New PHPCompatibility.ParameterValues.NewTrimCharactersDefault sniff. #2068
    • 🌟 New PHPCompatibility.ParameterValues.RemovedIsASubclassOfAllowStringFalse sniff. #2078
  • ⭐ PHPCompatibility.ParameterValues.NewPackFormat sniff: detect usage of the endianness modifiers for integers and floats as introduced in PHP 8.6. #2071
  • ⭐ PHPCompatibility.TypeCasts.NewTypeCasts sniff: 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) and T_VOID_CAST (PHP 8.5) to the constants detected via the PHPCompatibility.Constants.NewConstants sniff. #2022, #2050
  • ⭐ Various "list based" sniffs, like NewFunctions, RemovedIniDirectives, ForbiddenNames etc, 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.NewPackFormat sniff will now also detect the new format codes when used with the unpack() 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.LowPHP sniff. #2003
  • 🚫 PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.ASPOpenTagFound error code. #2003
    Potentially detected ASP open tags will now always be reported under the MaybeASPOpenTagFound error 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. 👏

Don't miss a new php-compatibility release

NewReleases is sending notifications on new releases.