Skip to content

Commit d16157d

Browse files
committed
Changelog for the 3.11.0 release
1 parent b5b2a55 commit d16157d

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,93 @@ The file documents changes to the PHP_CodeSniffer project.
108108

109109
_Nothing yet._
110110

111+
## [3.11.0] - 2024-11-12
112+
113+
### Added
114+
- Runtime support for PHP 8.4. All known PHP 8.4 deprecation notices have been fixed.
115+
- Syntax support for new PHP 8.4 features will follow in a future release.
116+
- If you find any PHP 8.4 deprecation notices which were missed, please report them.
117+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches.
118+
- Tokenizer support for PHP 8.3 "yield from" expressions with a comment between the keywords. [#529], [#647]
119+
- Sniffs explicitly handling T_YIELD_FROM tokens may need updating. The PR description contains example code for use by sniff developers.
120+
- Additionally, the following sniff has been updated to support "yield from" expressions with comments:
121+
- Generic.WhiteSpace.LanguageConstructSpacing
122+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
123+
- New `Generic.WhiteSpace.HereNowdocIdentifierSpacing` sniff. [#586], [#637]
124+
- Forbid whitespace between the `<<<` and the identifier string in heredoc/nowdoc start tokens.
125+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
126+
- New `Generic.Strings.UnnecessaryHeredoc` sniff. [#633]
127+
- Warns about heredocs without interpolation or expressions in the body text and can auto-fix these to nowdocs.
128+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
129+
- Documentation for the following sniffs:
130+
- Generic.Arrays.ArrayIndent
131+
- Squiz.PHP.Heredoc
132+
- Thanks to [Rodrigo Primo][@rodrigoprimo] and [Juliette Reinders Folmer][@jrfnl] for the patches.
133+
134+
### Changed
135+
- The Common::getSniffCode() method will now throw an InvalidArgumentException exception if an invalid `$sniffClass` is passed. [#524], [#625]
136+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
137+
- Documentation generated using the `--generator=...` feature will now always be presented in natural order based on the sniff name(s). [#668]
138+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
139+
- Minor improvements to the display of runtime information. [#658]
140+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
141+
- Squiz.Commenting.PostStatementComment: trailing annotations in PHP files will now be reported under a separate, non-auto-fixable error code `AnnotationFound`. [#560], [#627]
142+
- This prevents (tooling related) annotations from taking on a different meaning when moved by the fixer.
143+
- The separate error code also allows for selectively excluding it to prevent the sniff from triggering on trailing annotations, while still forbidding other trailing comments.
144+
- Thanks to [Rodrigo Primo][@rodrigoprimo] for the patch.
145+
- Squiz.ControlStructures.ForEachLoopDeclaration: the `SpacingAfterOpen` error code has been replaced by the `SpaceAfterOpen` error code. The latter is a pre-existing code. The former appears to have been a typo. [#582]
146+
- Thanks to [Dan Wallis][@fredden] for the patch.
147+
- The following sniff(s) have received efficiency improvements:
148+
- Generic.Classes.DuplicateClassName
149+
- Generic.NamingConventions.ConstructorName
150+
- Thanks to [Rodrigo Primo][@rodrigoprimo] and [Juliette Reinders Folmer][@jrfnl] for the patches.
151+
- Various housekeeping, including improvements to the tests and documentation.
152+
- Thanks to [Rodrigo Primo][@rodrigoprimo] and [Juliette Reinders Folmer][@jrfnl] for their contributions.
153+
154+
### Fixed
155+
- Fixed bug [#3808][sq-3808] : Generic.WhiteSpace.ScopeIndent would throw false positive for tab indented multi-token yield from expression.
156+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
157+
- Fixed bug [#630] : The tokenizer could inadvertently transform "normal" parentheses to DNF parentheses, when a function call was preceded by a switch-case / alternative syntax control structure colon.
158+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
159+
- Fixed bug [#645] : On PHP 5.4, if yield was used as the declaration name for a function declared to return by reference, the function name would incorrectly be tokenized as T_YIELD instead of T_STRING.
160+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
161+
- Fixed bug [#647] : Tokenizer not applying tab replacement in single token "yield from" keywords.
162+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
163+
- Fixed bug [#647] : Generic.WhiteSpace.DisallowSpaceIndent did not flag space indentation in multi-line yield from.
164+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
165+
- Fixed bug [#647] : Generic.WhiteSpace.DisallowTabIndent did not flag tabs inside yield from.
166+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
167+
- Fixed bug [#652] : Generic.NamingConventions.ConstructorName: false positives for PHP-4 style calls to PHP-4 style parent constructor when a method with the same name as the parent class was called on another class.
168+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
169+
- Fixed bug [#652] : Generic.NamingConventions.ConstructorName: false negatives for PHP-4 style calls to parent constructor for function calls with whitespace and comments in unconventional places.
170+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
171+
- Fixed bug [#653] : Generic.Classes.DuplicateClassName : the sniff did not skip namespace keywords used as operators, which could lead to false positives.
172+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
173+
- Fixed bug [#653] : Generic.Classes.DuplicateClassName : sniff going into an infinite loop during live coding.
174+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
175+
- Fixed bug [#653] : Generic.Classes.DuplicateClassName : false positives/negatives when a namespace declaration contained whitespace or comments in unconventional places.
176+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
177+
- Fixed bug [#653] : Generic.Classes.DuplicateClassName : namespace for a file going in/out of PHP was not remembered/applied correctly.
178+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch
179+
180+
[sq-3808]: https://github.com/squizlabs/PHP_CodeSniffer/issues/3808
181+
[#524]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/524
182+
[#529]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/529
183+
[#560]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/560
184+
[#582]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/582
185+
[#586]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/586
186+
[#625]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/625
187+
[#627]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/627
188+
[#630]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/630
189+
[#633]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/633
190+
[#637]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/637
191+
[#645]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/645
192+
[#647]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/647
193+
[#652]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/652
194+
[#653]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/653
195+
[#658]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/658
196+
[#668]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/668
197+
111198
## [3.10.3] - 2024-09-18
112199

113200
### Changed
@@ -7148,6 +7235,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
71487235
-->
71497236

71507237
[Unreleased]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/master...HEAD
7238+
[3.11.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.10.3...3.11.0
71517239
[3.10.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.10.2...3.10.3
71527240
[3.10.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.10.1...3.10.2
71537241
[3.10.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.10.0...3.10.1

0 commit comments

Comments
 (0)