Add deprecated warning helper function
This adds a standard method to log a deprecated function warning.
Deprecated function warnings were inconsistent and you have to put too much detail in the log line.
One simple function that autogenerates the log message based on caller.
Comments from previous PR #12007
I think @totten tried to enhance deprecated output at some point
A standalone helper function is more pithy than the Civi::log...civi.tag=>deprecated.... Pithy is good. From r-code perspective, I don't like having that helper in CRM_Utils_System. That class is too heavy already, and deprecatedFunctionWarning() is qualitatively different from every other function in the class.
Yes, I agree. I wasn't sure where to "dump" the function. Maybe
CRM/Core/Error/Log.php would be a better place for it?
My main hesitation with cf1p7hgkkprp9kthkosq98qrer was that findNonLogCaller() felt a little heavy-handed. It's nice how deprecatedFunctionWarning() doesn't have to dig as far back into the callstack. On the other hand, it's nice how cf1p7hgkkprp9kthkosq98qrer works with the existing coding convention.
We don't actually log deprecated very much so I don't think it's a big change to convention.