3.7.0
PHP 8.1 Language Feature Support
PHP_CodeSniffer has run correctly under PHP 8.1 since PHP 8 support was added, but it has not supported new 8.1 language features until this release. Version 3.7.0 adds support for the following PHP 8.1 language features:
- Enums
- Explicit octal notation
- Readonly properties
- Intersection types
- The
nevertype
Note: Standards and sniffs included with PHP_CodeSniffer have been updated to support these language features, but external standards and sniffs may need updating before they are able to detect them correctly.
Changelog
- Added support for PHP 8.1 explicit octal notation
- This new syntax has been backfilled for PHP versions less than 8.1
- Thanks to Mark Baker (@MarkBaker) for the patch
- Thanks to Juliette Reinders Folmer (@jrfnl) for additional fixes
- Added support for PHP 8.1 enums
- This new syntax has been backfilled for PHP versions less than 8.1
- Includes a new
T_ENUM_CASEtoken to represent the case statements inside an enum