Page MenuHomePhabricator

Remove final from private functions for PHP 8 compatibility

Authored by jrtc27 on Sun, Jan 10, 9:54 PM.



This combination does not make sense and PHP 8 errors with:

Private methods cannot be final as they are never overridden by other classes

Thus remove the redundant final from all such functions.

Test Plan

Used to create this revision with PHP 8 on macOS

Diff Detail

rARC Arcanist
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Owners added a reviewer: Unknown Object (Owners Package).Sun, Jan 10, 9:54 PM
epriestley removed a reviewer: Unknown Object (Owners Package).Sun, Jan 10, 9:55 PM

Thanks! There are some similar linters already (e.g., for final in a final class, or final on an abstract method) but this particular combination (private + final) slipped through. I'll add a linter so these don't get re-introduced and apply an equivalent change to Phabricator.

This revision is now accepted and ready to land.Sun, Jan 10, 10:00 PM

I added you to Blessed Committers, so you should be able to arc land this yourself. See the description of that project for more detailed instructions, or let me know if you run into issues. "Land Revision" here in the web UI should also work, or I can just pull it for you if that's easier.