You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,17 @@ This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/) and uses
14
14
15
15
_Nothing yet._
16
16
17
+
## [1.0.2] - 2023-01-10
18
+
19
+
### Changed
20
+
21
+
#### Universal
22
+
23
+
*`Universal.CodeAnalysis.ConstructorDestructorReturn`: the sniff will now respect a potentially set [`php_version` configuration option][php_version-config] and only report on PHP4-style constructors when the `php_version` is below `'80000'`. Thanks [@anomiex] for reporting! [#207], [#208]
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,6 @@ The sniff will make a distinction between keys which will be duplicate in all PH
177
177
If a [`php_version` configuration option][php_version-config] has been passed to PHPCS using either `--config-set` or `--runtime-set`, it will be respected by the sniff and only report duplicate keys for the configured PHP version.
@@ -218,6 +217,9 @@ Require a consistent modifier keyword order for class declarations.
218
217
* Disallows return type declarations on constructor/destructor methods - error code: `ReturnTypeFound`, auto-fixable.
219
218
* Discourages constructor/destructor methods returning a value - error code: `ReturnValueFound`.
220
219
220
+
If a [`php_version` configuration option][php_version-config] has been passed to PHPCS using either `--config-set` or `--runtime-set`, it will be respected by the sniff.
221
+
In effect, this means that the sniff will only report on PHP4-style constructors if the configured PHP version is less than 8.0.
Detects `foreach` control structures which use the same variable for both the key as well as the value assignment as this will lead to unexpected - and most likely unintended - behaviour.
@@ -478,3 +480,5 @@ This code is released under the GNU Lesser General Public License (LGPLv3). For
0 commit comments