From d63e34d7c4137b5329173c37209ca12554fcc09f Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 3 May 2017 13:26:04 +1200 Subject: [PATCH] Up the deprecation on old hook --- CRM/Utils/Hook.php | 7 +++++++ 1 file changed, 7 insertions(+) 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); } -- 2.25.1