Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Jun 7, 2023

Fixes GH-11388.

Following https://wiki.php.net/rfc/horizontalreuse which introduced traits, this should be allowed.
The implementation was refactored in 3f8c729. That commit is the first time the "final" check appears AFAICT, but no reason was given for why. That commit seems to have landed in 5.4.11 and the NEWS for that version doesn't seem to mention something relevant to the behaviour change. This patch removes the restriction of the final modifier.

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Makes sense to me 👍 A positive test might be nice, i.e. one that doesn't error.

Fixes phpGH-11388.

Following https://wiki.php.net/rfc/horizontalreuse which introduced traits,
this should be allowed.
The implementation was refactored in 3f8c729. That commit is the first time
the "final" check appears AFAICT, but no reason was given for why. That
commit seems to have landed in 5.4.11 and the NEWS for that version doesn't
seem to mention something relevant to the behaviour change.
This patch removes the restriction of the final modifier.

Closes phpGH-11394.
@ndossche ndossche merged commit 79d024a into php:master Jun 7, 2023
@ndossche
Copy link
Member Author

ndossche commented Jun 7, 2023

Merged with positive test, thx for reviewing.

@armandRobled
Copy link

Php-master

Copy link

@armandRobled armandRobled left a comment

Choose a reason for hiding this comment

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

  • [ ]

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.

Allow "final" modifier when importing a method from a trait

3 participants