Added
- Tokenizer support for PHP 8.4 dereferencing of new expressions without wrapping parentheses. #1160
- Thanks to Juliette Reinders Folmer for the patch.
- Tokenizer support for PHP 8.4
abstract
properties. #1183- The
File::getMemberProperties()
method now also supportsabstract
properties through a newis_abstract
array index in the return value. #1184 - Additionally, the following sniffs have been updated to support
abstract
properties: - Thanks to Juliette Reinders Folmer for the patches
- The
- Tokenizer support for the PHP 8.4 "exit as a function call" change. #1201
- When
exit
/die
is used as a fully qualified "function call", it will now be tokenized asT_NS_SEPARATOR
+T_EXIT
. - Additionally, the following sniff has been updated to handle fully qualified exit/die correctly:
- Squiz.PHP.NonExecutableCode
- Thanks to Juliette Reinders Folmer for the patches
- When
Changed
- Tokenizer/PHP: fully qualified
true
/false
/null
will now be tokenized asT_NS_SEPARATOR
+T_TRUE
/T_FALSE
/T_NULL
. #1201- Previously, these were tokenized as
T_NS_SEPARATOR
+T_STRING
. - Additionally, the following sniffs have been updated to handle fully qualified true/false/null correctly:
- Generic.CodeAnalysis.UnconditionalIfStatement
- Generic.ControlStructures.DisallowYodaConditions
- PEAR.Functions.ValidDefaultValue
- Thanks to Juliette Reinders Folmer for the patches.
- Previously, these were tokenized as
- Generic.PHP.Syntax: the sniff is now able to scan input provided via STDIN on non-Windows OSes. #915
- Thanks to Rodrigo Primo for the patch.
- PSR2.ControlStructures.SwitchDeclaration: the
WrongOpener*
error code is now auto-fixable if the identified "wrong opener" is a semi-colon. #1161- Thanks to Juliette Reinders Folmer for the patch.
- The PSR2.Classes.PropertyDeclaration will now check that the abstract modifier keyword is placed before a visibility keyword. #1188
- Errors will be reported via a new
AbstractAfterVisibility
error code. - Thanks to Juliette Reinders Folmer for the patch.
- Errors will be reported via a new
- Various housekeeping, including improvements to the tests and documentation.
- Thanks to Bernhard Zwein, Rick Kerkhof, Rodrigo Primo and Juliette Reinders Folmer for their contributions.
Fixed
- Fixed bug #1112 :
--parallel
option fails if PHP_CodeSniffer is invoked via bash and the invokation creates a non-PHPCS-managed process.- Thanks to Rick Kerkhof for the patch.
- Fixed bug #1113 : fatal error when the specified "files to scan" would result in the same file being added multiple times to the queue.
- This error only occured when
--parallel
scanning was enabled. - Thanks to Rodrigo Primo for the patch.
- This error only occured when
- Fixed bug #1154 : PEAR.WhiteSpace.ObjectOperatorIndent: false positive when checking multiple chained method calls in a multidimensional array.
- Thanks to Rodrigo Primo for the patch.
- Fixed bug #1193 : edge case inconsistency in how empty string array keys for sniff properties are handled.
- Thanks to Rodrigo Primo and Juliette Reinders Folmer for the patch.
- Fixed bug #1197 : Squiz.Commenting.FunctionComment: return types containing a class name with underscores would be truncated leading to incorrect results.
- Thanks to Juliette Reinders Folmer for the patch.
Other
- The Wiki documentation is now publicly editable. 🎉
- Update proposals can be submittted by opening a pull request in the PHPCSStandards/PHP_CodeSniffer-documentation repository.
Contributions welcome ! - Thanks to Anna Filina, Dan Wallis and Juliette Reinders Folmer for their work on getting this set up.
- Update proposals can be submittted by opening a pull request in the PHPCSStandards/PHP_CodeSniffer-documentation repository.
- The Phar website has had a facelift. #107
- Thanks to Bernhard Zwein for making this happen!
New Contributors
The PHP_CodeSniffer project is happy to welcome the following new contributors:
@benno5020, @NanoSector
Statistics
Closed: 11 issues
Merged: 40 pull requests
Follow @phpcs on Mastodon or @PHP_CodeSniffer on X to stay informed.
Please consider funding the PHP_CodeSniffer project. If you already do so: thank you!