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
Tokenizer/PHP: bug fix for static typed properties with union/intersection types
Just like the `var` keyword, the `static` keyword can also be used stand-alone with property declarations.
https://3v4l.org/sbaDM
In that case, the tokenization of the `|` operator was not changed to `T_TYPE_UNION` and the `&` operator was not changed to `T_TYPE_INTERSECTION` as the `static` keyword can also be used in return type declarations, so was seen as part of the type declaration.
Fixed now by removing the `T_STATIC` token from the `$allowed` list before walking backwards from the operator.
Includes tests.
Note: this does mean that one test for the `File::getMemberProperties()` method needs to be changed, but as that was testing an illegal syntax anyway, I'm not concerned about making this change.
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
130
+
- Fixed bug #3867 : Tokenizer/PHP: union type and intersection type operators were not correctly tokenized for static typed properties without explicit visibility
131
+
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
130
132
- Fixed bug #3877 : Filter names can be case-sensitive. The -h help text will now display the correct case for the available filters
131
133
- Thanks to @simonsan for the patch
132
134
- Fixed bug #3906 : Tokenizer/CSS: fixed a bug related to the unsupported slash comment syntax
0 commit comments