Skip to content

Commit 0525c73

Browse files
authored
Merge pull request #1318 from PHPCSStandards/feature/changelog-4.0.1
Changelog for the 4.0.1 release
2 parents 7ed8ea2 + 4c09fb4 commit 0525c73

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

CHANGELOG-4.x.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,44 @@
22

33
The file documents changes to the PHP_CodeSniffer project for the 4.x series of releases.
44

5+
## [4.0.1] - 2025-11-10
6+
7+
This release includes all improvements and bugfixes from PHP_CodeSniffer [3.13.5].
8+
9+
### Added
10+
- Runtime support for PHP 8.5. All known PHP 8.5 deprecation notices have been fixed.
11+
- Syntax support for new PHP 8.5 features will follow in a future release.
12+
- If you find any PHP 8.5 deprecation notices which were missed, please report them.
13+
14+
### Changed
15+
- The Squiz.ControlStructures.SwitchDeclaration sniff will now flag a PHP close tag as a "wrong opener" and will auto-fix this by inserting a colon. [#1316]
16+
- Various housekeeping, including improvements to the tests and documentation.
17+
18+
### Fixed
19+
- 4.x regression [#1277]: bring back whitespace tolerance in `phpcs:ignore` comma-separated rule reference lists.
20+
- Note: this bug did not affect `phpcs:disable`/`phpcs:enable` ignore annotations.
21+
- Fixed bug [#968]: Generic.WhiteSpace.ScopeIndent was reporting false positives - and making incorrect fixes - for lines following a line containing an arrow function.
22+
- Thanks to [Soichi Sato][@Soh1121] for the patch.
23+
- Fixed bug [#1216]: Tokenizer/PHP: added more defensive coding to prevent PHP 8.5 "Using null as an array offset" deprecation notices.
24+
- Thanks to [Andrew Lyons][@andrewnicols] for the patch.
25+
- Fixed bug [#1279]: Tokenizer/PHP: on PHP < 8.0, an unclosed attribute (parse error) could end up removing some tokens from the token stream.
26+
- This could lead to false positives and false negative from sniffs, but could also lead to incorrect fixes being made mangling the file under scan.
27+
- Fixed bug [#1315]: Squiz.ControlStructures.SwitchDeclaration: a number of the fixers would get into fixer conflicts with each other if the code under scan contained multiple statements on a line within a `switch`.
28+
- The sniff will now forbid - and auto-fix - multiple statements on one line for `case`/`default` and "case breaking" statements.
29+
- Fixed bug [#1316]: Tokenizer/PHP: a PHP close tag after a `switch` case condition or after a `default` keyword, was not regarded as a "scope_opener" for the `case`/`default` body.
30+
- Fixed bug [#1316]: PSR2.ControlStructures.SwitchDeclaration: the `WrongOpener` error is now also auto-fixable if the wrong opener is a PHP close tag.
31+
- Fixed bug [#1316]: Squiz.PHP.NonExecutableCode would throw false positives when code within a switch control structure would move in and out of PHP.
32+
33+
[3.13.5]: https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/4.x/CHANGELOG-3.x.md#3135---2025-11-04
34+
35+
[#968]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/968
36+
[#1216]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1216
37+
[#1277]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1277
38+
[#1279]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1279
39+
[#1315]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1315
40+
[#1316]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/1316
41+
42+
543
## [4.0.0] - 2025-09-16
644

745
This release contains breaking changes.
@@ -392,6 +430,7 @@ Special thanks go out to [Dan Wallis][@fredden] and [Rodrigo Primo][@rodrigoprim
392430
=== Link list for release links ====
393431
-->
394432

433+
[4.0.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/4.0.0...4.0.1
395434
[4.0.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/4.0.0RC1...4.0.0
396435
[4.0.0RC1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/4.0.0beta1...4.0.0RC1
397436
[4.0.0beta1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.13.0...4.0.0beta1
@@ -401,8 +440,10 @@ Special thanks go out to [Dan Wallis][@fredden] and [Rodrigo Primo][@rodrigoprim
401440
=== Link list for contributor profiles ====
402441
-->
403442

443+
[@andrewnicols]: https://github.com/andrewnicols
404444
[@anomiex]: https://github.com/anomiex
405445
[@fredden]: https://github.com/fredden
406446
[@gsherwood]: https://github.com/gsherwood
407447
[@jrfnl]: https://github.com/jrfnl
408448
[@rodrigoprimo]: https://github.com/rodrigoprimo
449+
[@Soh1121]: https://github.com/Soh1121

0 commit comments

Comments
 (0)