You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow "final" modifier when importing a method from a trait #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. I'll check what happens if we remove the check.
Activity
ndossche commentedon Jun 7, 2023
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. I'll check what happens if we remove the check.
Allow final modifier when using a method from a trait (#11394)