@@ -17,162 +17,18 @@ http://pear.php.net/dtd/package-2.0.xsd">
17
17
<date>2021-04-09</date>
18
18
<time>10:51:00</time>
19
19
<version>
20
- <release>3.6.0 </release>
21
- <api>3.6.0 </api>
20
+ <release>3.6.1 </release>
21
+ <api>3.6.1 </api>
22
22
</version>
23
23
<stability>
24
24
<release>stable</release>
25
25
<api>stable</api>
26
26
</stability>
27
27
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
28
28
<notes>
29
- - Added support for PHP 8.0 union types
30
- -- A new T_TYPE_UNION token is available to represent the pipe character
31
- -- File::getMethodParameters(), getMethodProperties(), and getMemberProperties() will now return union types
32
- -- Thanks to Juliette Reinders Folmer for the patch
33
- - Added support for PHP 8.0 named function call arguments
34
- -- A new T_PARAM_NAME token is available to represent the label with the name of the function argument in it
35
- -- Thanks to Juliette Reinders Folmer for the patch
36
- - Added support for PHP 8.0 attributes
37
- -- The PHP-supplied T_ATTRIBUTE token marks the start of an attribute
38
- -- A new T_ATTRIBUTE_END token is available to mark the end of an attribute
39
- -- New attribute_owner and attribute_closer indexes are available in the tokens array for all tokens inside an attribute
40
- -- Tokenizing of attributes has been backfilled for older PHP versions
41
- -- The following sniffs have been updated to support attributes:
42
- --- PEAR.Commenting.ClassComment
43
- --- PEAR.Commenting.FileComment
44
- --- PSR1.Files.SideEffects
45
- --- PSR12.Files.FileHeader
46
- --- Squiz.Commenting.ClassComment
47
- --- Squiz.Commenting.FileComment
48
- --- Squiz.WhiteSpace.FunctionSpacing
49
- ---- Thanks to Vadim Borodavko for the patch
29
+ - Fixed bug #3294 : Bug in attribute tokenization when content contains PHP end token or attribute closer on new line
50
30
-- Thanks to Alessandro Chitolina for the patch
51
- - Added support for PHP 8.0 dereferencing of text strings with interpolated variables
52
- -- Thanks to Juliette Reinders Folmer for the patch
53
- - Added support for PHP 8.0 match expressions
54
- -- Match expressions are now tokenised with parenthesis and scope openers and closers
55
- --- Sniffs can listen for the T_MATCH token to process match expressions
56
- --- Note that the case and default statements inside match expressions do not have scopes set
57
- -- A new T_MATCH_ARROW token is available to represent the arrows in match expressions
58
- -- A new T_MATCH_DEFAULT token is available to represent the default keyword in match expressions
59
- -- All tokenizing of match expressions has been backfilled for older PHP versions
60
- -- The following sniffs have been updated to support match expressions:
61
- --- Generic.CodeAnalysis.AssignmentInCondition
62
- --- Generic.CodeAnalysis.EmptyPHPStatement
63
- ---- Thanks to Vadim Borodavko for the patch
64
- --- Generic.CodeAnalysis.EmptyStatement
65
- --- Generic.PHP.LowerCaseKeyword
66
- --- PEAR.ControlStructures.ControlSignature
67
- --- PSR12.ControlStructures.BooleanOperatorPlacement
68
- --- Squiz.Commenting.LongConditionClosingComment
69
- --- Squiz.Commenting.PostStatementComment
70
- --- Squiz.ControlStructures.LowercaseDeclaration
71
- --- Squiz.ControlStructures.ControlSignature
72
- --- Squiz.Formatting.OperatorBracket
73
- --- Squiz.PHP.DisallowMultipleAssignments
74
- --- Squiz.Objects.ObjectInstantiation
75
- --- Squiz.WhiteSpace.ControlStructureSpacing
76
- -- Thanks to Juliette Reinders Folmer for the patch
77
- - The value of the T_FN_ARROW token has changed from "T_FN_ARROW" to "PHPCS_T_FN_ARROW" to avoid package conflicts
78
- -- This will have no impact on custom sniffs unless they are specifically looking at the value of the T_FN_ARROW constant
79
- -- If sniffs are just using constant to find arrow functions, they will continue to work without modification
80
- -- Thanks to Juliette Reinders Folmer for the patch
81
- - File::findStartOfStatement() now works correctly when passed the last token in a statement
82
- - File::getMethodParameters() now supports PHP 8.0 constructor property promotion
83
- -- Returned method params now include a "property_visibility" and "visibility_token" index if property promotion is detected
84
- -- Thanks to Juliette Reinders Folmer for the patch
85
- - File::getMethodProperties() now includes a "return_type_end_token" index in the return value
86
- -- This indicates the last token in the return type, which is helpful when checking union types
87
- -- Thanks to Juliette Reinders Folmer for the patch
88
- - Include patterns are now ignored when processing STDIN
89
- -- Previously, checks using include patterns were excluded when processing STDIN when no file path was provided via --stdin-path
90
- -- Now, all include and exclude rules are ignored when no file path is provided, allowing all checks to run
91
- -- If you want include and exclude rules enforced when checking STDIN, use --stdin-path to set the file path
92
- -- Thanks to Juliette Reinders Folmer for the patch
93
- - Spaces are now correctly escaped in the paths to external on Windows
94
- -- Thanks to Juliette Reinders Folmer for the patch
95
- - Added Generic.NamingConventions.AbstractClassNamePrefix to enforce that class names are prefixed with "Abstract"
96
- -- Thanks to Anna Borzenko for the contribution
97
- - Added Generic.NamingConventions.InterfaceNameSuffix to enforce that interface names are suffixed with "Interface"
98
- -- Thanks to Anna Borzenko for the contribution
99
- - Added Generic.NamingConventions.TraitNameSuffix to enforce that trait names are suffixed with "Trait"
100
- -- Thanks to Anna Borzenko for the contribution
101
- - Generic.CodeAnalysis.UnusedFunctionParameter can now be configured to ignore variable usage for specific type hints
102
- -- This allows you to suppress warnings for some variables that are not required, but leave warnings for others
103
- -- Set the ignoreTypeHints array property to a list of type hints to ignore
104
- -- Thanks to Petr Bugyík for the patch
105
- - Generic.Formatting.MultipleStatementAlignment can now align statements at the start of the assignment token
106
- -- Previously, the sniff enforced that the values were aligned, even if this meant the assignment tokens were not
107
- -- Now, the sniff can enforce that the assignment tokens are aligned, even if this means the values are not
108
- -- Set the "alignAtEnd" sniff property to "false" to align the assignment tokens
109
- -- The default remains at "true", so the assigned values are aligned
110
- -- Thanks to John P. Bloch for the patch
111
- - Generic.PHP.LowerCaseType now supports checking of typed properties
112
- -- Thanks to Juliette Reinders Folmer for the patch
113
- - Generic.PHP.LowerCaseType now supports checking of union types
114
- -- Thanks to Juliette Reinders Folmer for the patch
115
- - PEAR.Commenting.FunctionComment and Squiz.Commenting.FunctionComment sniffs can now ignore private and protected methods
116
- -- Set the "minimumVisibility" sniff property to "protected" to ignore private methods
117
- -- Set the "minimumVisibility" sniff property to "public" to ignore both private and protected methods
118
- -- The default remains at "private", so all methods are checked
119
- -- Thanks to Vincent Langlet for the patch
120
- - PEAR.Commenting.FunctionComment and Squiz.Commenting.FunctionComment sniffs can now ignore return tags in any method
121
- -- Previously, only __construct and __destruct were ignored
122
- -- Set the list of method names to ignore in the "specialMethods" sniff property
123
- -- The default remains at "__construct" and "__destruct" only
124
- -- Thanks to Vincent Langlet for the patch
125
- - PSR2.ControlStructures.SwitchDeclaration now supports nested switch statements where every branch terminates
126
- -- Previously, if a CASE only contained a SWITCH and no direct terminating statement, a fall-through error was displayed
127
- -- Now, the error is surpressed if every branch of the SWITCH has a terminating statement
128
- -- Thanks to Vincent Langlet for the patch
129
- - The PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket error message is now reported on the closing parenthesis token
130
- -- Previously, the error was being reported on the function keyword, leading to confusing line numbers in the error report
131
- - Squiz.Commenting.FunctionComment is now able to ignore function comments that are only inheritdoc statements
132
- -- Set the skipIfInheritdoc sniff property to "true" to skip checking function comments if the content is only {@inhertidoc}
133
- -- The default remains at "false", so these comments will continue to report errors
134
- -- Thanks to Jess Myrbo for the patch
135
- - Squiz.Commenting.FunctionComment now supports the PHP 8 mixed type
136
- -- Thanks to Vadim Borodavko for the patch
137
- - Squiz.PHP.NonExecutableCode now has improved handling of syntax errors
138
- -- Thanks to Thiemo Kreuz for the patch
139
- - Squiz.WhiteSpace.ScopeKeywordSpacing now checks spacing when using PHP 8.0 constructor property promotion
140
- -- Thanks to Juliette Reinders Folmer for the patch
141
- - Fixed an issue that could occurr when checking files on network drives, such as with WSL2 on Windows 10
142
- -- This works around a long-standing PHP bug with is_readable()
143
- -- Thanks to Michael S for the patch
144
- - Fixed a number of false positives in the Squiz.PHP.DisallowMultipleAssignments sniff
145
- -- Sniff no longer errors for default value assignments in arrow functions
146
- -- Sniff no longer errors for assignments on first line of closure
147
- -- Sniff no longer errors for assignments after a goto label
148
- -- Thanks to Jaroslav Hanslík for the patch
149
- - Fixed bug #2913 : Generic.WhiteSpace.ScopeIndent false positive when opening and closing tag on same line inside conditional
150
- - Fixed bug #2992 : Enabling caching using a ruleset produces invalid cache files when using --sniffs and --exclude CLI args
151
- - Fixed bug #3003 : Squiz.Formatting.OperatorBracket autofix incorrect when assignment used with null coalescing operator
152
- - Fixed bug #3145 : Autoloading of sniff fails when multiple classes declared in same file
153
- - Fixed bug #3157 : PSR2.ControlStructures.SwitchDeclaration.BreakIndent false positive when case keyword is not indented
154
- - Fixed bug #3163 : Undefined index error with pre-commit hook using husky on PHP 7.4
155
- -- Thanks to Ismo Vuorinen for the patch
156
- - Fixed bug #3165 : Squiz.PHP.DisallowComparisonAssignment false positive when comparison inside closure
157
- - Fixed bug #3167 : Generic.WhiteSpace.ScopeIndent false positive when using PHP 8.0 constructor property promotion
158
- - Fixed bug #3170 : Squiz.WhiteSpace.OperatorSpacing false positive when using negation with string concat
159
- -- This also fixes the same issue in the PSR12.Operators.OperatorSpacing sniff
160
- - Fixed bug #3177 : Incorrect tokenization of GOTO statements in mixed PHP/HTML files
161
- -- Thanks to Juliette Reinders Folmer for the patch
162
- - Fixed bug #3184 : PSR2.Namespace.NamespaceDeclaration false positive on namespace operator
163
- -- Thanks to Juliette Reinders Folmer for the patch
164
- - Fixed bug #3188 : Squiz.WhiteSpace.ScopeKeywordSpacing false positive for static return type
165
- -- Thanks to Juliette Reinders Folmer for the patch
166
- - Fixed bug #3192 : findStartOfStatement doesn't work correctly inside switch
167
- -- Thanks to Vincent Langlet for the patch
168
- - Fixed bug #3195 : Generic.WhiteSpace.ScopeIndent confusing message when combination of tabs and spaces found
169
- - Fixed bug #3197 : Squiz.NamingConventions.ValidVariableName does not use correct error code for all member vars
170
- - Fixed bug #3219 : Generic.Formatting.MultipleStatementAlignment false positive for empty anonymous classes and closures
171
- - Fixed bug #3258 : Squiz.Formatting.OperatorBracket duplicate error messages for unary minus
172
- -- Thanks to Juliette Reinders Folmer for the patch
173
- - Fixed bug #3273 : Squiz.Functions.FunctionDeclarationArgumentSpacing reports line break as 0 spaces between parenthesis
174
- - Fixed bug #3277 : Nullable static return typehint causes whitespace error
175
- - Fixed bug #3284 : Unused parameter false positive when using array index in arrow function
31
+ -- Thanks to Juliette Reinders Folmer for the tests
176
32
</notes>
177
33
<contents>
178
34
<dir name="/">
0 commit comments