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
minor #4593 Ensure compatibility with PHP 7.4 typed properties (julienfalque)
This PR was merged into the 2.15 branch.
Discussion
----------
Ensure compatibility with PHP 7.4 typed properties
Related to #4382.
Commits
-------
3cd398e Ensure compatibility with PHP 7.4 typed properties
Properties MUST not be explicitly initialized with ``null``.
1068
+
Properties MUST not be explicitly initialized with ``null`` except when
1069
+
they have a type declaration (PHP 7.4).
1069
1070
1070
1071
* **no_php4_constructor**
1071
1072
@@ -1169,7 +1170,7 @@ Choose from the list of available rules:
1169
1170
1170
1171
Properties should be set to ``null`` instead of using ``unset``.
1171
1172
1172
-
*Risky rule: changing variables to ``null`` instead of unsetting them will mean they still show up when looping over class variables.*
1173
+
*Risky rule: changing variables to ``null`` instead of unsetting them will mean they still show up when looping over class variables. With PHP 7.4, this rule might introduce ``null`` assignments to property whose type declaration does not allow it.*
0 commit comments