Skip to content

Commit 22babe5

Browse files
committed
Changelog for the 3.12.0 release
1 parent 97e340e commit 22babe5

File tree

1 file changed

+172
-0
lines changed

1 file changed

+172
-0
lines changed

CHANGELOG.md

+172
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,179 @@ The file documents changes to the PHP_CodeSniffer project.
66

77
_Nothing yet._
88

9+
## [3.12.0] - 2025-03-18
10+
11+
### Added
12+
- Added support for PHP 8.4 `final` properties to File::getMemberProperties() through a new `is_final` array index in the return value. [#834]
13+
- Thanks to [Daniel Scherzer][@DanielEScherzer] for the patch.
14+
- Generators/HTML: each section title now has a unique anchor link, which can be copied when hovering over a title. [#859]
15+
- This should make sharing a link to a specific section of the documentation more straight-forward.
16+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
17+
- Documentation for the following sniffs:
18+
- Squiz.Classes.ClassFileName
19+
- Squiz.Classes.ValidClassName
20+
- Thanks to [Brian Dunne][@braindawg] for the patches.
21+
22+
### Changed
23+
- PHPCBF: the messaging when no fixable errors are found will now distinguish between "No violations" (at all) versus "No fixable errors". [#806]
24+
- Thanks to [Peter Wilson][@peterwilsoncc] for the patch.
25+
- The `-h` (Help) option now contains a more extensive list of "config" options which can be set. [#809]
26+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
27+
- Improved error message when invalid sniff codes are supplied to `--sniffs` or `--exclude` command line arguments. [#344]
28+
- Thanks to [Dan Wallis][@fredden] for the patch.
29+
- Improved error message when an invalid generator name is supplied to the `--generator` command line argument. [#709], [#771]
30+
- The generator name will now also always be handled case-insensitively, independently of the OS used.
31+
- Thanks to [Rodrigo Primo][@rodrigoprimo] for the patch.
32+
- The user will be shown an informative error message for sniffs missing one of the required methods. [#873]
33+
- Previously this would result in a fatal error.
34+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
35+
- Ruleset processing will now be allowed to run to its conclusion - barring critical errors - before displaying all ruleset errors in one go. [#857]
36+
- Previously an error in a ruleset would cause PHPCS to exit immediately and show only one error at a time.
37+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
38+
- Generators: XML documentation files which don't contain any actual documentation will now silently be ignored. [#755]
39+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
40+
- Generators: when the `title` attribute is missing, the documentation generation will now fall back to the sniff name as the title. [#820]
41+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
42+
- Generators: cleaner output based on the elements of the documentation which are available. [#819], [#821]
43+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
44+
- Generators/HTML: improved display of code tables by using semantic HTML. [#854]
45+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
46+
- Squiz.Classes.ClassFileName: recommend changing the file name instead of changing the class name. [#845]
47+
- This prevents unactionable recommendations due to the file name not translating to a valid PHP symbol name.
48+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
49+
- 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]
50+
- This was previously already flagged, but using either the `SpacingBeforeHint` or `NoSpaceBeforeHint` error code, which was misleading.
51+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
52+
- Squiz.Functions.FunctionDeclarationArgumentSpacing: the sniff will now also check the spacing after property modifiers for promoted properties in constructor methods. [#792]
53+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
54+
- Squiz.WhiteSpace.ScopeKeywordSpacing: the sniff will now also check the spacing after the `final` and `abstract` modifier keywords. [#604]
55+
- Thanks to [Klaus Purer][@klausi] for the patch.
56+
- The following sniff(s) have received efficiency improvements:
57+
- Squiz.WhiteSpace.ScopeKeywordSpacing
58+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patches.
59+
- Incorrectly set inline properties (in test case files) will be silently ignored again. [#884]
60+
- This removes the `Internal.PropertyDoesNotExist` error code.
61+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
62+
- The AbstractMethodUnitTest class will now flag duplicate test case markers in a test case file. [#773]
63+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
64+
- Various housekeeping, including improvements to the tests and documentation.
65+
- Thanks to [Asis Pattisahusiwa][@asispts], [Dan Wallis][@fredden], [Rodrigo Primo][@rodrigoprimo] and [Juliette Reinders Folmer][@jrfnl] for their contributions.
66+
67+
### Deprecated
68+
All deprecation are slated for removal in PHP_CodeSniffer 4.0.
69+
70+
- Support for sniffs not implementing the PHPCS `Sniff` interface. See [#694].
71+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
72+
- Support for including sniffs which don't comply with the PHPCS naming conventions (by referencing the sniff file directly). See [#689].
73+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
74+
- Support for external standards named "Internal". See [#799].
75+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
76+
- The following Generator methods are now (soft) deprecated. See [#755]:
77+
- `PHP_CodeSniffer\Generators\Text::printTitle()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedTitle()`
78+
- `PHP_CodeSniffer\Generators\Text::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedTextBlock()`
79+
- `PHP_CodeSniffer\Generators\Text::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\Text::getFormattedCodeComparisonBlock()`
80+
- `PHP_CodeSniffer\Generators\Markdown::printHeader()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedHeader()`
81+
- `PHP_CodeSniffer\Generators\Markdown::printFooter()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedFooter()`
82+
- `PHP_CodeSniffer\Generators\Markdown::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedTextBlock()`
83+
- `PHP_CodeSniffer\Generators\Markdown::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\Markdown::getFormattedCodeComparisonBlock()`
84+
- `PHP_CodeSniffer\Generators\HTML::printHeader()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedHeader()`
85+
- `PHP_CodeSniffer\Generators\HTML::printToc()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedToc()`
86+
- `PHP_CodeSniffer\Generators\HTML::printFooter()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedFooter()`
87+
- `PHP_CodeSniffer\Generators\HTML::printTextBlock()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedTextBlock()`
88+
- `PHP_CodeSniffer\Generators\HTML::printCodeComparisonBlock()` in favour of `PHP_CodeSniffer\Generators\HTML::getFormattedCodeComparisonBlock()`
89+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
90+
91+
### Fixed
92+
- Fixed bug [#794] : Generators: prevent fatal error when the XML documentation does not comply with the expected format.
93+
- It is recommended to validate XML documentation files against the XSD file: <https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd>
94+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
95+
- Fixed bug [#814] : Generic.NamingConventions.ConstructorName: prevent potential fatal errors during live coding.
96+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
97+
- Fixed bug [#816] : File::getDeclarationName(): prevent incorrect result for unfinished closures during live coding.
98+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
99+
- Fixed bug [#817] : Squiz.Classes.ValidClassName: ignore comments when determining the name to be validated.
100+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
101+
- Fixed bug [#825] : Squiz.Classes.ClassDeclaration: false positives when the next thing after a class was a function with an attribute attached.
102+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
103+
- Fixed bug [#826] : Squiz.WhiteSpace.FunctionSpacing: prevent incorrect some results when attributes are attached to a function.
104+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
105+
- Fixed bug [#827] : PEAR.Functions.FunctionDeclaration: fixer conflict over an unfinished closure during live coding.
106+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
107+
- Fixed bug [#828] : Squiz.WhiteSpace.MemberVarSpacing: allow for `readonly` properties.
108+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
109+
- Fixed bug [#832] : Squiz.WhiteSpace.MemberVarSpacing: prevent potential fixer conflict during live coding.
110+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
111+
- 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.
112+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
113+
- Fixed bug [#833] : Squiz.PHP.EmbeddedPhp: incorrect indent calculation in certain specific situations.
114+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
115+
- Fixed bug [#835] : Generic.PHP.DisallowShortOpenTag: don't act on parse errors.
116+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
117+
- 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.
118+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
119+
- Fixed bug [#840] : Squiz.WhiteSpace.MemberVarSpacing: more accurate reporting on blank lines in the property "pre-amble" (i.e. docblock, attributes).
120+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
121+
- Fixed bug [#845] : Squiz.Classes.ClassFileName: don't throw an incorrect error for an unfinished OO declaration during live coding.
122+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
123+
- Fixed bug [#865] : Setting an array property to an empty array from an XML ruleset now works correctly.
124+
- Previously, the property value would be set to `[0 => '']`.
125+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
126+
- Fixed bug [#866] : Squiz.WhiteSpace.FunctionOpeningBraceSpace: XML docs were not accessible due to an issue with the file name.
127+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
128+
129+
### Other
130+
- A new [wiki page][wiki-about-standards] is available to clarify the difference between a project ruleset and an external standard.
131+
- This wiki page also contains detailed information about the naming conventions external standards must comply with.
132+
- 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.
133+
134+
[wiki-about-standards]: https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/About-Standards-for-PHP_CodeSniffer
135+
[xmllint-validate]: https://github.com/marketplace/actions/xmllint-validate
136+
137+
[#344]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/344
138+
[#604]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/604
139+
[#689]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/689
140+
[#694]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/694
141+
[#709]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/709
142+
[#755]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/755
143+
[#771]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/771
144+
[#773]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/773
145+
[#792]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/792
146+
[#794]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/794
147+
[#799]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/799
148+
[#806]: https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/806
149+
[#809]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/809
150+
[#814]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/814
151+
[#816]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/816
152+
[#817]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/817
153+
[#819]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/819
154+
[#820]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/820
155+
[#821]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/821
156+
[#825]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/825
157+
[#826]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/826
158+
[#827]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/827
159+
[#828]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/828
160+
[#832]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/832
161+
[#833]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/833
162+
[#834]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/834
163+
[#835]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/835
164+
[#838]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/838
165+
[#840]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/840
166+
[#845]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/845
167+
[#854]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/854
168+
[#857]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/857
169+
[#859]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/859
170+
[#865]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/865
171+
[#866]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/866
172+
[#873]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/873
173+
[#884]: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/884
174+
9175
## [3.11.3] - 2025-01-23
10176

11177
### Changed
12178
- Generic.ControlStructures.InlineControlStructure no longer unnecessarily listens for T_SWITCH tokens. [#595]
13179
- Thanks to [Rodrigo Primo][@rodrigoprimo] for the patch.
14180
- Squiz.Functions.FunctionDeclarationArgumentSpacing: improvements to error message for `SpaceBeforeComma` error. [#783]
181+
- Thanks to [Juliette Reinders Folmer][@jrfnl] for the patch.
15182
- The following sniff(s) have received efficiency improvements:
16183
- Squiz.Functions.FunctionDeclarationArgumentSpacing
17184
- Thanks to [Dan Wallis][@fredden] and [Juliette Reinders Folmer][@jrfnl] for the patches.
@@ -7245,6 +7412,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
72457412
-->
72467413

72477414
[Unreleased]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/master...HEAD
7415+
[3.12.0]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.3...3.12.0
72487416
[3.11.3]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.2...3.11.3
72497417
[3.11.2]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.1...3.11.2
72507418
[3.11.1]: https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.0...3.11.1
@@ -7369,6 +7537,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
73697537
[@annechko]: https://github.com/annechko
73707538
[@anomiex]: https://github.com/anomiex
73717539
[@arnested]: https://github.com/arnested
7540+
[@asispts]: https://github.com/asispts
73727541
[@asnyder]: https://github.com/asnyder
73737542
[@Astinus-Eberhard]: https://github.com/Astinus-Eberhard
73747543
[@axlon]: https://github.com/axlon
@@ -7385,6 +7554,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
73857554
[@blue32a]: https://github.com/blue32a
73867555
[@bondas83]: https://github.com/bondas83
73877556
[@boonkerz]: https://github.com/boonkerz
7557+
[@braindawg]: https://github.com/braindawg
73887558
[@BRMatt]: https://github.com/BRMatt
73897559
[@CandySunPlus]: https://github.com/CandySunPlus
73907560
[@ceeram]: https://github.com/ceeram
@@ -7396,6 +7566,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
73967566
[@cweiske]: https://github.com/cweiske
73977567
[@Daimona]: https://github.com/Daimona
73987568
[@danez]: https://github.com/danez
7569+
[@DanielEScherzer]: https://github.com/DanielEScherzer
73997570
[@DannyvdSluijs]: https://github.com/DannyvdSluijs
74007571
[@das-peter]: https://github.com/das-peter
74017572
[@datengraben]: https://github.com/datengraben
@@ -7508,6 +7679,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
75087679
[@ondrejmirtes]: https://github.com/ondrejmirtes
75097680
[@orx0r]: https://github.com/orx0r
75107681
[@ostrolucky]: https://github.com/ostrolucky
7682+
[@peterwilsoncc]: https://github.com/peterwilsoncc
75117683
[@pfrenssen]: https://github.com/pfrenssen
75127684
[@phil-davis]: https://github.com/phil-davis
75137685
[@photodude]: https://github.com/photodude

0 commit comments

Comments
 (0)