-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Allow "final" modifier when importing a method from a trait #11388
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
Comments
Following https://wiki.php.net/rfc/horizontalreuse (which introduced traits), this should be allowed. |
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.
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.
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. Closes GH-11394.
Description
Not sure why this is not allowed currently, but it'd be nice allowing it if there aren't any blockers:
This currently produces: "Cannot use 'final' as method modifier"
The text was updated successfully, but these errors were encountered: