Opened 10 years ago
Closed 3 months ago
#30177 closed enhancement (duplicate)
Eliminate deprecated pointers
Reported by: | rzen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
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
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).