[wp-trac] [WordPress Trac] #30177: Eliminate deprecated pointers

WordPress Trac noreply at wordpress.org
Wed Oct 29 17:19:34 UTC 2014


#30177: Eliminate deprecated pointers
----------------------------+-----------------------------
 Reporter:  rzen            |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:
  Focuses:  ui              |
----------------------------+-----------------------------
 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

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30177>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list