-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[PHP 8.0] Add constructor promotion #667
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
[PHP 8.0] Add constructor promotion #667
Conversation
|
Ready for review |
|
I have no idea how to port this part of grammar. At least, I've added test case that is failing to keep https://github.com/php/php-src/pull/5291/files#diff-7eff82c2c5b45db512a9dc49fb990bb8R1092 |
| return $this->pModifiers($node->flags) | ||
| . 'function ' . ($node->byRef ? '&' : '') . $node->name | ||
| . '(' . $this->pCommaSeparated($node->params) . ')' | ||
| . '(' . $this->pMaybeMultiline($node->params) . ')' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems needed to keep param-per-line formatting, to persist the doc block annotation above the param
|
This is now ready to review & merge 👍 |
|
Thanks! Merged as b58b19e with a change to support formatting-preservation. |
|
Any ETA on releasing this? And also PHPStan needs to upgrade to this version before Rector can, as it uses static reflection that prefer it's own classes. |
|
@TomasVotruba Done! |
|
Thank you |
Based on grammar https://github.com/php/php-src/pull/5291/files#diff-7eff82c2c5b45db512a9dc49fb990bb8