tolerant-php-parser icon indicating copy to clipboard operation
tolerant-php-parser copied to clipboard

Support parsing php 8.3 typed class constants

Open TysonAndre opened this issue 1 year ago • 2 comments
trafficstars

https://wiki.php.net/rfc/typed_class_constants#inheritance_and_variance As of php 8.3, class constants can have the same types as parameters (including union, intersection, and DNF types)

Start testing with php 8.3

TysonAndre avatar Dec 26 '23 18:12 TysonAndre

-<ST_IN_SCRIPTING>"yield"{WHITESPACE}"from"[^a-zA-Z0-9_\x80-\xff] {
+<ST_IN_SCRIPTING>"yield"{WHITESPACE_OR_COMMENTS}"from"[^a-zA-Z0-9_\x80-\xff] {
        yyless(yyleng - 1);
        HANDLE_NEWLINES(yytext, yyleng);
        RETURN_TOKEN_WITH_IDENT(T_YIELD_FROM);

tests/cases/lexical/keyword5.php.tokens started failing in php 8.3 because php now lexes yield /*awesome*/ from as T_YIELD_FROM

TysonAndre avatar Dec 26 '23 19:12 TysonAndre

The tests won't run until https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks

1 workflow awaiting approval This workflow requires approval from a maintainer. Learn more about approving workflows. 1 in progress and 1 successful checks

TysonAndre avatar Jan 03 '24 15:01 TysonAndre