-
Notifications
You must be signed in to change notification settings - Fork 72
feat(php8): promoted properties #685
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
Conversation
This should close #655 |
@czosel I think this approach should be changed in favour of how https://github.com/nikic/PHP-Parser/ handles it, and add a Param.flags that holds a int flag for visibility (public/private/protected) rather than a new ast node type. Ill add another PR for that when I get a chance |
For reference: PHP-Parser parses class __proto__ {
public function constructor(public int $id, private $name, protected ServerRequestInterface $req) {}
} as
I agree, a visibility flag is the best way to represent this 👍 |
Use the implmentaton in #697 |
Basic impementation of promoted properties.
Added new AST node
promotedparameter
which is based onparameter
with addedpromote
property which can bepublic
,private
, orprotected
.Is this the correct way to do this?