[wp-trac] [WordPress Trac] #50897: PHP 8: fix final private methods
WordPress Trac
noreply at wordpress.org
Tue Aug 11 16:31:30 UTC 2020
#50897: PHP 8: fix final private methods
------------------------------+-----------------------------
Reporter: jrf | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: minor | Keywords: has-patch php8
Focuses: coding-standards |
------------------------------+-----------------------------
Declaring a `private` method as `final` is an oxymoron, as `private`
methods cannot be overloaded anyway.
Using `final private function...` will generate a warning in PHP 8.
The attached patch fixes all known instances of this in WP Core at the
time of writing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50897>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list