Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#30177 new enhancement

Eliminate deprecated pointers

Reported by: rzen's profile rzen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch dev-feedback needs-refresh
Focuses: Cc:


While working on #30158 @nacin suggested that we eliminate the now irrelevant pointers (anything before 3.9). Initially I followed the existing convention: blanking, but leaving, the internal pointer method.

@nacin also mentioned that we should eventually removing those blanked methods and that they were only left behind because we hadn't considered the full ramifications of straight removing them. I spent a few brain cycles on exactly that these past several hours and below are my findings.

Option The First:
We can completely remove these methods with no negative impact whatsoever. Reason: The pointer class is Final and cannot be extended (so there are no inheritance concerns) and these static methods themselves are completely useless in isolation. There is no reasonable explanation for a person ever calling these methods directly, and calling remove_action() on them does not depend on their existence, either.

Option The Second:
We remove the methods and register a new get_deprecated_pointers() method to be used in tandem with a __callStatic() magic method in order to inform the fringiest fringe-case developer that they've done something abhorrently wrong (in the most polite way possible).

My vote is for Option 1 because I can't fathom a world in which someone would have a productive reason to statically call one of these pointer methods in isolation. Option 2 gives us a new list to maintain fairly unnecessarily and succeeds in adding more lines of code than it removes.

I've provided patches for each option so all that is left is for someone else to weigh in with their opinions.

@jjj likes option 2
@aaroncampbell likes option 1

Attachments (2)

30177.option1.diff (2.3 KB) - added by rzen 9 years ago.
30177.option2.diff (3.5 KB) - added by rzen 9 years ago.

Download all attachments as: .zip

Change History (5)

9 years ago

9 years ago

This ticket was mentioned in Slack in #core by rzen. View the logs.

9 years ago

#2 @rzen
9 years ago

  • Focuses ui removed
  • Keywords has-patch dev-feedback added

#3 @chriscct7
8 years ago

  • Keywords needs-refresh added
Note: See TracTickets for help on using tickets.