Make WordPress Core

Opened 12 years ago

Closed 2 years ago

#30177 closed enhancement (duplicate)

Eliminate deprecated pointers

Reported by: rzen Owned by:
Priority: normal Milestone:
Component: Administration Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

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 12 years ago.
30177.option2.diff​ (3.5 KB ) - added by rzen 12 years ago.

Download all attachments as: .zip

Change History (6)

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


12 years ago

#2 @rzen
12 years ago

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

#3 @chriscct7
11 years ago

  • Keywords needs-refresh added

#4 @desrosj
2 years ago

  • Keywords dev-feedback needs-refresh removed
  • Resolution → duplicate
  • Status new → closed

I found this one scrubbing tickets missing a milestone.

It looks like this was addressed through the #33289/[33593]. The use of pointers has been essentially abandoned. The most recent one was added for the privacy features in 4.9.6, but that was removed in 5.2 after enough time had passed. (see #45999).

Note: See TracTickets for help on using tickets.