PHP 7.3 support
nikic opened this issue · 2 comments
PHP 7.3 adds support for three new language features:
- https://wiki.php.net/rfc/trailing-comma-function-calls
- https://wiki.php.net/rfc/list_reference_assignment
- https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes
We need to review if these require any changes in php-ast. I think we might need to add some flags handling for the list()
change, while the other two should work as-is.
For trailing-comma-function, it'd be useful to know so that applications could efficiently warn about backwards incompatibility. I don't think the information is available from php-src from skimming the code, you'd have a better idea.
I haven't seen any backwards incompatibility changes in my applications.
List reference assignment works the way I'd expect it to, I think, but it's been a while. I haven't looked closely at nowdoc/heredoc yet.
Indeed, looks like everything was already working fine. I've added an ARRAY_ELEM_REF
flag in c62f10f to avoid using 1
as a magic number, but the AST generation itself did not need adjustments.
For trailing-comma-function, it'd be useful to know so that applications could efficiently warn about backwards incompatibility. I don't think the information is available from php-src from skimming the code, you'd have a better idea.
Yeah, we don't have that information in the AST.