Page MenuHomePhabricator

Remove final from private functions for PHP 8 compatibility

Authored by jrtc27 on Jan 10 2021, 9:54 PM.
Referenced Files
Unknown Object (File)
Sun, May 28, 9:36 PM
Unknown Object (File)
Wed, May 24, 4:32 AM
Unknown Object (File)
Sat, May 13, 11:32 AM
Unknown Object (File)
Apr 25 2023, 3:27 PM
Unknown Object (File)
Apr 13 2023, 3:42 AM
Unknown Object (File)
Apr 7 2023, 6:40 PM
Unknown Object (File)
Apr 1 2023, 9:43 PM
Unknown Object (File)
Mar 27 2023, 5:05 AM



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
Lint Not Applicable
Tests Not Applicable

Event Timeline

Owners added a reviewer: Unknown Object (Owners Package).Jan 10 2021, 9:54 PM
epriestley removed a reviewer: Unknown Object (Owners Package).Jan 10 2021, 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.Jan 10 2021, 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.