Opened 12 years ago
Last modified 6 years ago
#23454 assigned enhancement
_deprecated_function Messages
Reported by: | mikejolley | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
Unlike _deprecated_file and _deprecated_argument, the _deprecated_function function has no option to append a message to the triggered notice.
I propose adding this to make it consistant with the other 2 functions. Patch to follow.
Attachments (1)
Change History (7)
#2
@
11 years ago
@SergeyBiryukov this change is fairly trivial - any chance it will make it into 3.9?
#4
@
11 years ago
We haven't had a need for this in core. The reason is because both functions can pretty well describe why one is deprecated for the other. In the case of arguments and files, things are less obvious.
#5
@
11 years ago
@nacin I cannot remember the exact case I needed it (10 months ago!) but if you are deprecating a function and there is no replacement, or their is a replacement function that is substantially different, you cannot add any explanation to your message - all you can currently get it to output is:
"X is deprecated since version X with no alternative available."
The change would allow us to add more explanation, and is perfectly backwards compatible with existing uses. Not to mention making it work in line with the other _deprecated functions. Are there any disadvantages to adding it I'm not seeing?
Patch for #23454