Skip to content

Add separate static property through trait if parent already declares it #10937

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

Closed
wants to merge 1 commit into from

Conversation

iluuu1994
Copy link
Member

@iluuu1994 iluuu1994 commented Mar 25, 2023

Closes GH-10935

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

It is almost like a language supported and failsafe copy'n'paste mechanism to build classes.

It's reasonable to expect the case with and without properties to behave equivalently.

Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

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

I won't object.
I see - the proposed logic works.
It looks weird, but works.

@iluuu1994
Copy link
Member Author

https://externals.io/message/119809 There weren't any objections from the mailing list, so I'll merge this PR.

@iluuu1994 iluuu1994 closed this in 9a250cc Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static properties in traits don't override static properties from parent class
2 participants