Skip to content

Changelog for the 3.12.2 release #963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,68 @@ The file documents changes to the PHP_CodeSniffer project.

_Nothing yet._

## [3.12.2] - 2025-04-13

### Added
- Added support for PHP 8.4 `final` properties to the following sniffs:
- Generic.PHP.LowerCaseConstant [#948]
- Generic.PHP.UpperCaseConstant [#948]
- Squiz.Commenting.DocCommentAlignment [#951]
- Squiz.Commenting.VariableComment [#949]
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches.

### Changed
- Tokenizer/PHP: a PHP open tag at the very end of a file will now always be tokenized as T_OPEN_TAG, independently of the PHP version. [#937]
- Previously, a PHP open tag at the end of a file was not tokenized as an open tag on PHP < 7.4 and the tokenization would depend on the `short_open_tag` setting.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- PEAR.Commenting.FunctionComment: improved message for "blank lines between docblock and declaration" check. [#830]
- The documentation for the following sniffs has been improved:
- Generic.Functions.OpeningFunctionBraceBsdAllman
- Generic.Functions.OpeningFunctionBraceKernighanRitchie
- Generic.WhiteSpace.LanguageConstructSpacing
- Thanks to [Rodrigo Primo][@rodrigoprimo] for the patches.
- Various housekeeping, including improvements to the tests and documentation.
- Thanks to [Rodrigo Primo][@rodrigoprimo] and [Juliette Reinders Folmer][@jrfnl] for their contributions.

### Fixed
- Fixed bug [#830] : PEAR.Commenting.FunctionComment will no longer remove blank lines within attributes.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#929] : Generic.PHP.ForbiddenFunctions: prevent false positives/negatives for code interlaced with comments.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#934] : Generic.PHP.LowerCaseConstant and Generic.PHP.UpperCaseConstant will now correctly ignore DNF types for properties.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#936] : Squiz.Commenting.FunctionCommentThrowTag: sniff would bow out when function has attributes attached, leading to false negatives.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#940] : Squiz.Commenting.VariableComment: false positive for missing docblock for properties using DNF types.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#944] : Squiz.Commenting.FunctionComment did not support DNF/intersection types in `@param` tags.
- Thanks to [Jeffrey Angenent][@devfrey] for the patch.
- Fixed bug [#945] : Squiz.WhiteSpace.FunctionSpacing would get confused when there are two docblocks above a function declaration.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#947] : Squiz.Commenting.FunctionCommentThrowTag: prevent false positives/negatives for code interlaced with comments.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#951] : Squiz.Commenting.DocCommentAlignment did not examine docblocks for `final` classes.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#955] : Potential race condition, leading to a fatal error, when both the `Diff` + the `Code` reports are requested and caching is on.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
- Fixed bug [#956] : Generic.WhiteSpace.ScopeIndent: undefined array index notice when running in debug mode.
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.

[#830]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/830
[#929]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/929
[#934]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/934
[#936]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/936
[#937]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/937
[#940]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/940
[#944]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/944
[#945]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/945
[#947]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/947
[#948]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/948
[#949]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/949
[#951]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/951
[#955]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/955
[#956]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/956

## [3.12.1] - 2025-04-04

### Added
Expand Down Expand Up @@ -7450,6 +7512,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
-->

[Unreleased]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/master...HEAD
[3.12.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.12.1...3.12.2
[3.12.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.12.0...3.12.1
[3.12.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.3...3.12.0
[3.11.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.2...3.11.3
Expand Down Expand Up @@ -7613,6 +7676,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
[@Decave]: https://github.com/Decave
[@dereuromark]: https://github.com/dereuromark
[@derrabus]: https://github.com/derrabus
[@devfrey]: https://github.com/devfrey
[@deviantintegral]: https://github.com/deviantintegral
[@dhensby]: https://github.com/dhensby
[@dingo-d]: https://github.com/dingo-d
Expand Down