From: eileen Date: Wed, 3 May 2017 01:26:04 +0000 (+1200) Subject: Up the deprecation on old hook X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d63e34d7c4137b5329173c37209ca12554fcc09f;p=civicrm-core.git Up the deprecation on old hook --- diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index 28462ccf97..602028a378 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1980,6 +1980,13 @@ abstract class CRM_Utils_Hook { * @deprecated */ public static function alterMail(&$mailer, $driver, $params) { + // This has been deprecated on the premise it MIGHT be called externally for a long time. + // We don't have a clear policy on how much we support external extensions calling internal + // hooks (ie. in general we say 'don't call internal functions', but some hooks like pre hooks + // are expected to be called externally. + // It's really really unlikely anyone uses this - but let's add deprecations for a couple + // of releases first. + Civi::log()->warning('Deprecated function CRM_Utils_Hook::alterMail, use CRM_Utils_Hook::alterMailer', array('civi.tag' => 'deprecated')); return CRM_Utils_Hook::alterMailer($mailer, $driver, $params); }