Skip to content

Property hook #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 5, 2025
Merged

Property hook #2

merged 3 commits into from
Feb 5, 2025

Conversation

dantleech
Copy link

@dantleech dantleech commented Feb 5, 2025

This PR is based on the work of @TysonAndre and further:

  • Makes PropertyHook a FunctionLike
  • Supports property hook parsing when a default value is present.

To be honest I have no idea what the tests are doing, but they don't pass here anyway 😄

TysonAndre and others added 3 commits January 27, 2025 22:29
As part of this, stricten the parsing of property names and use a
narrower syntax but reuse AssignmentExpression for backwards
compatibility of applications that originally used tolerant-php-parser's
result of parseExpression.

References:
https://wiki.php.net/rfc/property-hooks and the linked php-src PR's
zend_language_parser.y

https://wiki.php.net/rfc/property-hooks#abbreviated_syntax
https://wiki.php.net/rfc/property-hooks#interaction_with_constructor_property_promotion
@dantleech dantleech merged commit 092205e into main Feb 5, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants