packagist phpcompatibility/php-compatibility 10.0.0-alpha2
10.0.0-alpha2 - 2025-11-28

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.

See all related issues and PRs in the 10.0.0-alpha2 milestone.

Added

  • PHP cross-version:
    • 🌟 New PHPCompatibility.Keywords.ForbiddenClassAlias sniff. #1952
    • 🌟 New PHPCompatibility.LanguageConstructs.RemovedLanguageConstructs sniff. #1948
      This sniff in its initial version will detect the PHP 8.5 deprecation of the backtick operator.
  • PHP 8.3:
    • 🌟 New PHPCompatibility.ParameterValues.NewClassAliasInternalClass sniff. #1951
    • 🌟 New PHPCompatibility.Syntax.NewDynamicClassConstantFetch sniff. #1974
  • PHP 8.5:
    • 🌟 New PHPCompatibility.Classes.NewStaticAvizProperties sniff. #1950
  • PHPCompatibility.Classes.NewClasses sniff: recognize the new DateTime and SQLite extension related error and exception classes as introduced in PHP 8.3. #1936, #1937
  • PHPCompatibility.Constants.NewConstants sniff: recognize various constants from the Mhash extension. #1938
  • PHPCompatibility.ParameterValues.ChangedIntToBoolParamType sniff: detect the Zlib $use_include_path parameter type change as per PHP 8.5. #1949
  • ⭐ The "list based" sniffs, like NewFunctions, RemovedIniDirectives, ForbiddenNames etc, have received updates to account for new/deprecated/removed PHP classes, constants, functions, function parameters, ini directives, reserved namespaces and type casts as per PHP 8.5.
  • 📚 Documentation for the following sniffs:
    • PHPCompatibility.Syntax.NewShortArray #1997

Changed

  • 🔀 PHPCompatibility.TypeCasts.RemovedTypeCasts has new error codes. #1941
    • The t_unset_castDeprecatedRemoved has been changed to unsetDeprecatedRemoved.
    • The t_double_castDeprecatedRemoved has been changed to realDeprecatedRemoved.
  • 📌 PHPCompatibility.Keywords.ForbiddenNames will now also detect incompatible use of the "other" reserved keywords parent and self. #1940
  • 🔧 ☔ Various housekeeping, including general maintenance, improvements to speed up the sniffs, improvements to CI, the tests and documentation.

Credits

Thanks go out to @afilina and @okkun-sh for their contributions to this version. 👏

Don't miss a new php-compatibility release

NewReleases is sending notifications on new releases.