[RFC] Final Property Promotion#17861
Conversation
|
This does not appear to be explicitly specified in the RFC and is a language change. I'm not sure this is an appropriate bugfix for 8.4. |
|
/cc @Crell |
|
This came up, and there were some concerns it could imply const parameters as in Java. So we just left it out. |
|
So no, this is not a bug. If you think |
e3cee1b to
ad6d15a
Compare
final in constructor property promotion| public private(set) mixed $p7; | ||
| public private(set) final mixed $p8; | ||
|
|
||
| public function __construct( final $p9 ) {} |
There was a problem hiding this comment.
public function __construct( $p9 ) {}
It would be good to test also the case without the final property in the constructor.
ad6d15a to
6475a39
Compare
|
Any more reviewers? If not I'll probably merge this next week |
iluuu1994
left a comment
There was a problem hiding this comment.
Only nits, the implementation looks correct. Thanks @DanielEScherzer!
TimWolla
left a comment
There was a problem hiding this comment.
Don't forget to also add NEWS before merging.
https://wiki.php.net/rfc/final_promotion