Skip to content

Conversation

@TysonAndre
Copy link
Contributor

https://wiki.php.net/rfc/constructor_promotion

Note that PHP 8.0 will parse visibility modifiers on all parameters,
but it will be a compile-time error to use them anywhere except
a __construct method.

Fixes #323

https://wiki.php.net/rfc/constructor_promotion

Note that PHP 8.0 will parse visibility modifiers on all parameters,
but it will be a compile-time error to use them anywhere except
a __construct method.

Fixes microsoft#323
@@ -0,0 +1,50 @@
[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is parameterPromotion2.php missing?

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Is this good to be merged even though PHP 8 is not released? Is that proposal stable?

@TysonAndre
Copy link
Contributor Author

Thanks! Is this good to be merged even though PHP 8 is not released? Is that proposal stable?

I'd consider it to be stable. The php-src PR linked in https://wiki.php.net/rfc/constructor_promotion#php_rfcconstructor_property_promotion was already merged to the 8.0-dev(master) branch, and there's no discussion of changing it on the mailing list. The release managers plan to release 8.0.0 in November 2020 (https://wiki.php.net/todo/php80#timetable)

@roblourens roblourens merged commit 2096712 into microsoft:master Jun 15, 2020
@TysonAndre TysonAndre deleted the parameter-promotion branch March 27, 2021 16:50
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.

Support php 8.0 constructor property promotion

2 participants