Skip to content

Commit 4386f81

Browse files
committed
Changelog for the 3.12.0 release
1 parent a348292 commit 4386f81

File tree

1 file changed

+172
-0
lines changed

1 file changed

+172
-0
lines changed

CHANGELOG.md

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

109109
_Nothing yet._
110110

111+
## [3.12.0] - 2025-03-18
112+
113+
### Added
114+
- Added support for PHP 8.4 `final` properties to File::getMemberProperties() through a new `is_final` array index in the return value. [#834]
115+
- Thanks to [Daniel Scherzer][@DanielEScherzer] for the patch.
116+
- Generators/HTML: each section title now has a unique anchor link, which can be copied when hovering over a title. [#859]
117+
- This should make sharing a link to a specific section of the documentation more straight-forward.
118+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
119+
- Documentation for the following sniffs:
120+
- Squiz.Classes.ClassFileName
121+
- Squiz.Classes.ValidClassName
122+
- Thanks to [Brian Dunne][@braindawg] for the patches.
123+
124+
### Changed
125+
- PHPCBF: the messaging when no fixable errors are found will now distinguish between "No violations" (at all) versus "No fixable errors". [#806]
126+
- Thanks to [Peter Wilson][@peterwilsoncc] for the patch.
127+
- The `-h` (Help) option now contains a more extensive list of "config" options which can be set. [#809]
128+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
129+
- Improved error message when invalid sniff codes are supplied to `--sniffs` or `--exclude` command line arguments. [#344]
130+
- Thanks to [Dan Wallis][@fredden] for the patch.
131+
- Improved error message when an invalid generator name is supplied to the `--generator` command line argument. [#709], [#771]
132+
- The generator name will now also always be handled case-insensitively, independently of the OS used.
133+
- Thanks to [Rodrigo Primo][@rodrigoprimo] for the patch.
134+
- The user will be shown an informative error message for sniffs missing one of the required methods. [#873]
135+
- Previously this would result in a fatal error.
136+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
137+
- Ruleset processing will now be allowed to run to its conclusion - barring critical errors - before displaying all ruleset errors in one go. [#857]
138+
- Previously an error in a ruleset would cause PHPCS to exit immediately and show only one error at a time.
139+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
140+
- Generators: XML documentation files which don't contain any actual documentation will now silently be ignored. [#755]
141+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
142+
- Generators: when the `title` attribute is missing, the documentation generation will now fall back to the sniff name as the title. [#820]
143+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
144+
- Generators: cleaner output based on the elements of the documentation which are available. [#819], [#821]
145+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
146+
- Generators/HTML: improved display of code tables by using semantic HTML. [#854]
147+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
148+
- Squiz.Classes.ClassFileName: recommend changing the file name instead of changing the class name. [#845]
149+
- This prevents unactionable recommendations due to the file name not translating to a valid PHP symbol name.
150+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
151+
- Squiz.Functions.FunctionDeclarationArgumentSpacing: incorrect spacing after a comma followed by a promoted property has an improved error message and will now be flagged with the `SpacingBeforePropertyModifier` or `NoSpaceBeforePropertyModifier` error codes. [#792]
152+
- This was previously already flagged, but using either the `SpacingBeforeHint` or `NoSpaceBeforeHint` error code, which was misleading.
153+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
154+
- Squiz.Functions.FunctionDeclarationArgumentSpacing: the sniff will now also check the spacing after property modifiers for promoted properties in constructor methods. [#792]
155+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
156+
- Squiz.WhiteSpace.ScopeKeywordSpacing: the sniff will now also check the spacing after the `final` and `abstract` modifier keywords. [#604]
157+
- Thanks to [Klaus Purer][@klausi] for the patch.
158+
- The following sniff(s) have received efficiency improvements:
159+
- Squiz.WhiteSpace.ScopeKeywordSpacing
160+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches.
161+
- Incorrectly set inline properties (in test case files) will be silently ignored again. [#884]
162+
- This removes the `Internal.PropertyDoesNotExist` error code.
163+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
164+
- The AbstractMethodUnitTest class will now flag duplicate test case markers in a test case file. [#773]
165+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
166+
- Various housekeeping, including improvements to the tests and documentation.
167+
- Thanks to [Asis Pattisahusiwa][@asispts], [Dan Wallis][@fredden], [Rodrigo Primo][@rodrigoprimo] and [Juliette Reinders Folmer][@jrfnl] for their contributions.
168+
169+
### Deprecated
170+
All deprecation are slated for removal in PHP_CodeSniffer 4.0.
171+
172+
- Support for sniffs not implementing the PHPCS `Sniff` interface. See [#694].
173+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
174+
- Support for including sniffs which don't comply with the PHPCS naming conventions (by referencing the sniff file directly). See [#689].
175+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
176+
- Support for external standards named "Internal". See [#799].
177+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
178+
- The following Generator methods are now (soft) deprecated. See [#755]:
179+
- `PHP_CodeSniffer\Generators\Text::printTitle()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedTitle()`
180+
- `PHP_CodeSniffer\Generators\Text::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedTextBlock()`
181+
- `PHP_CodeSniffer\Generators\Text::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedCodeComparisonBlock()`
182+
- `PHP_CodeSniffer\Generators\Markdown::printHeader()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedHeader()`
183+
- `PHP_CodeSniffer\Generators\Markdown::printFooter()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedFooter()`
184+
- `PHP_CodeSniffer\Generators\Markdown::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedTextBlock()`
185+
- `PHP_CodeSniffer\Generators\Markdown::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedCodeComparisonBlock()`
186+
- `PHP_CodeSniffer\Generators\HTML::printHeader()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedHeader()`
187+
- `PHP_CodeSniffer\Generators\HTML::printToc()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedToc()`
188+
- `PHP_CodeSniffer\Generators\HTML::printFooter()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedFooter()`
189+
- `PHP_CodeSniffer\Generators\HTML::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedTextBlock()`
190+
- `PHP_CodeSniffer\Generators\HTML::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedCodeComparisonBlock()`
191+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
192+
193+
### Fixed
194+
- Fixed bug [#794] : Generators: prevent fatal error when the XML documentation does not comply with the expected format.
195+
- It is recommended to validate XML documentation files against the XSD file: <https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd>
196+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
197+
- Fixed bug [#814] : Generic.NamingConventions.ConstructorName: prevent potential fatal errors during live coding.
198+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
199+
- Fixed bug [#816] : File::getDeclarationName(): prevent incorrect result for unfinished closures during live coding.
200+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
201+
- Fixed bug [#817] : Squiz.Classes.ValidClassName: ignore comments when determining the name to be validated.
202+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
203+
- Fixed bug [#825] : Squiz.Classes.ClassDeclaration: false positives when the next thing after a class was a function with an attribute attached.
204+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
205+
- Fixed bug [#826] : Squiz.WhiteSpace.FunctionSpacing: prevent incorrect some results when attributes are attached to a function.
206+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
207+
- Fixed bug [#827] : PEAR.Functions.FunctionDeclaration: fixer conflict over an unfinished closure during live coding.
208+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
209+
- Fixed bug [#828] : Squiz.WhiteSpace.MemberVarSpacing: allow for `readonly` properties.
210+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
211+
- Fixed bug [#832] : Squiz.WhiteSpace.MemberVarSpacing: prevent potential fixer conflict during live coding.
212+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
213+
- Fixed bug [#833] : Squiz.PHP.EmbeddedPhp: fixer conflict when a PHP open tag for a multi-line snippet is found on the same line as a single-line embedded PHP snippet.
214+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
215+
- Fixed bug [#833] : Squiz.PHP.EmbeddedPhp: incorrect indent calculation in certain specific situations.
216+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
217+
- Fixed bug [#835] : Generic.PHP.DisallowShortOpenTag: don't act on parse errors.
218+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
219+
- Fixed bug [#838] : Squiz.PHP.EmbeddedPhp: no new line before close tag was incorrectly enforced when a preceding OO construct or function had a trailing comment after the close curly.
220+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
221+
- Fixed bug [#840] : Squiz.WhiteSpace.MemberVarSpacing: more accurate reporting on blank lines in the property "pre-amble" (i.e. docblock, attributes).
222+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
223+
- Fixed bug [#845] : Squiz.Classes.ClassFileName: don't throw an incorrect error for an unfinished OO declaration during live coding.
224+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
225+
- Fixed bug [#865] : Setting an array property to an empty array from an XML ruleset now works correctly.
226+
- Previously, the property value would be set to `[0 => '']`.
227+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
228+
- Fixed bug [#866] : Squiz.WhiteSpace.FunctionOpeningBraceSpace: XML docs were not accessible due to an issue with the file name.
229+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
230+
231+
### Other
232+
- A new [wiki page][wiki-about-standards] is available to clarify the difference between a project ruleset and an external standard.
233+
- This wiki page also contains detailed information about the naming conventions external standards must comply with.
234+
- A new [XMLLint validate][xmllint-validate] action runner is available which can be used in CI to validate rulesets for PHP_CodeSniffer against the XSD.
235+
236+
[wiki-about-standards]: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/About-Standards-for-PHP_CodeSniffer
237+
[xmllint-validate]: https://github.com/marketplace/actions/xmllint-validate
238+
239+
[#344]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/344
240+
[#604]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/604
241+
[#689]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/689
242+
[#694]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/694
243+
[#709]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/709
244+
[#755]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/755
245+
[#771]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/771
246+
[#773]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/773
247+
[#792]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/792
248+
[#794]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/794
249+
[#799]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/799
250+
[#806]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/806
251+
[#809]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/809
252+
[#814]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/814
253+
[#816]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/816
254+
[#817]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/817
255+
[#819]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/819
256+
[#820]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/820
257+
[#821]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/821
258+
[#825]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/825
259+
[#826]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/826
260+
[#827]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/827
261+
[#828]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/828
262+
[#832]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/832
263+
[#833]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/833
264+
[#834]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/834
265+
[#835]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/835
266+
[#838]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/838
267+
[#840]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/840
268+
[#845]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/845
269+
[#854]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/854
270+
[#857]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/857
271+
[#859]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/859
272+
[#865]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/865
273+
[#866]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/866
274+
[#873]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/873
275+
[#884]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/884
276+
111277
## [3.11.3] - 2025-01-23
112278

113279
### Changed
114280
- Generic.ControlStructures.InlineControlStructure no longer unnecessarily listens for T_SWITCH tokens. [#595]
115281
- Thanks to [Rodrigo Primo][@rodrigoprimo] for the patch.
116282
- Squiz.Functions.FunctionDeclarationArgumentSpacing: improvements to error message for `SpaceBeforeComma` error. [#783]
283+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
117284
- The following sniff(s) have received efficiency improvements:
118285
- Squiz.Functions.FunctionDeclarationArgumentSpacing
119286
- Thanks to [Dan Wallis][@fredden] and [Juliette Reinders Folmer][@jrfnl] for the patches.
@@ -7347,6 +7514,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
73477514
-->
73487515

73497516
[Unreleased]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/master...HEAD
7517+
[3.12.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.3...3.12.0
73507518
[3.11.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.2...3.11.3
73517519
[3.11.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.1...3.11.2
73527520
[3.11.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.0...3.11.1
@@ -7471,6 +7639,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
74717639
[@annechko]: https://github.com/annechko
74727640
[@anomiex]: https://github.com/anomiex
74737641
[@arnested]: https://github.com/arnested
7642+
[@asispts]: https://github.com/asispts
74747643
[@asnyder]: https://github.com/asnyder
74757644
[@Astinus-Eberhard]: https://github.com/Astinus-Eberhard
74767645
[@axlon]: https://github.com/axlon
@@ -7487,6 +7656,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
74877656
[@blue32a]: https://github.com/blue32a
74887657
[@bondas83]: https://github.com/bondas83
74897658
[@boonkerz]: https://github.com/boonkerz
7659+
[@braindawg]: https://github.com/braindawg
74907660
[@BRMatt]: https://github.com/BRMatt
74917661
[@CandySunPlus]: https://github.com/CandySunPlus
74927662
[@ceeram]: https://github.com/ceeram
@@ -7498,6 +7668,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
74987668
[@cweiske]: https://github.com/cweiske
74997669
[@Daimona]: https://github.com/Daimona
75007670
[@danez]: https://github.com/danez
7671+
[@DanielEScherzer]: https://github.com/DanielEScherzer
75017672
[@DannyvdSluijs]: https://github.com/DannyvdSluijs
75027673
[@das-peter]: https://github.com/das-peter
75037674
[@datengraben]: https://github.com/datengraben
@@ -7610,6 +7781,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
76107781
[@ondrejmirtes]: https://github.com/ondrejmirtes
76117782
[@orx0r]: https://github.com/orx0r
76127783
[@ostrolucky]: https://github.com/ostrolucky
7784+
[@peterwilsoncc]: https://github.com/peterwilsoncc
76137785
[@pfrenssen]: https://github.com/pfrenssen
76147786
[@phil-davis]: https://github.com/phil-davis
76157787
[@photodude]: https://github.com/photodude

0 commit comments

Comments
 (0)