From 2c369ec7495aef8ad459665d44541b180cee1623 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 18 Mar 2020 10:33:06 -0400 Subject: [PATCH 1/3] Remove deprecated CRM_Utils_Hook::alterMail --- CRM/Utils/Hook.php | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index f873febaa062..00e217789c80 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -2144,32 +2144,6 @@ public static function alterMailer(&$mailer, $driver, $params) { ->invoke(['mailer', 'driver', 'params'], $mailer, $driver, $params, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_alterMailer'); } - /** - * Deprecated: Misnamed version of alterMailer(). Remove post-4.7.x. - * Modify or replace the Mailer object used for outgoing mail. - * - * @param object $mailer - * The default mailer produced by normal configuration; a PEAR "Mail" class (like those returned by Mail::factory) - * @param string $driver - * The type of the default mailer (eg "smtp", "sendmail", "mock", "CRM_Mailing_BAO_Spool") - * @param array $params - * The default mailer config options - * - * @return mixed - * @see Mail::factory - * @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. - CRM_Core_Error::deprecatedFunctionWarning('CRM_Utils_Hook::alterMailer'); - return CRM_Utils_Hook::alterMailer($mailer, $driver, $params); - } - /** * This hook is called while building the core search query, * so hook implementers can provide their own query objects which alters/extends core search. From 0b546455dfe04714e10711f7a7b9b937ea4a4000 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 18 Mar 2020 10:36:02 -0400 Subject: [PATCH 2/3] Remove deprecated report functions --- CRM/Report/Form.php | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index aa285498900e..8d51b1b1fefd 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -4653,46 +4653,6 @@ public function fiscalYearOffset($fieldName) { ($fy['d'] > 1 ? (" - INTERVAL " . ($fy['d'] - 1) . " DAY") : '') . " )"; } - /** - * Add Address into From Table if required. - * - * @deprecated use joinAddressFromContact - * (left here in case extensions use it). - */ - public function addAddressFromClause() { - CRM_Core_Error::deprecatedFunctionWarning('CRM_Report_Form::joinAddressFromContact'); - // include address field if address column is to be included - if ((isset($this->_addressField) && - $this->_addressField - ) || - $this->isTableSelected('civicrm_address') - ) { - $this->_from .= " - LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} - ON ({$this->_aliases['civicrm_contact']}.id = - {$this->_aliases['civicrm_address']}.contact_id) AND - {$this->_aliases['civicrm_address']}.is_primary = 1\n"; - } - } - - /** - * Add Phone into From Table if required. - * - * @deprecated use joinPhoneFromContact - * (left here in case extensions use it). - */ - public function addPhoneFromClause() { - CRM_Core_Error::deprecatedFunctionWarning('CRM_Report_Form::joinPhoneFromContact'); - // include address field if address column is to be included - if ($this->isTableSelected('civicrm_phone')) { - $this->_from .= " - LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']} - ON ({$this->_aliases['civicrm_contact']}.id = - {$this->_aliases['civicrm_phone']}.contact_id) AND - {$this->_aliases['civicrm_phone']}.is_primary = 1\n"; - } - } - /** * Add Address into From Table if required. * From 0677f5a4eec8233dc9c54aa947dd028fae4729eb Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 18 Mar 2020 10:48:15 -0400 Subject: [PATCH 3/3] Annotate deprecated functions --- CRM/ACL/BAO/ACL.php | 4 +++- CRM/Activity/BAO/Activity.php | 2 +- CRM/Utils/PDF/Utils.php | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/ACL/BAO/ACL.php b/CRM/ACL/BAO/ACL.php index a76081f8df31..3f8653147486 100644 --- a/CRM/ACL/BAO/ACL.php +++ b/CRM/ACL/BAO/ACL.php @@ -30,7 +30,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL { /** * Get ACL entity table. - * + * @deprecated * @return array|null */ public static function entityTable() { @@ -46,6 +46,7 @@ public static function entityTable() { /** * @return array|null + * @deprecated */ public static function objectTable() { CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed'); @@ -88,6 +89,7 @@ public static function operation() { * The ID of the object. * @param array $tables * Tables that will be needed in the FROM. + * @deprecated * * @return string|null * WHERE-style clause to filter results, diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index ec13f74d59fa..c2e818108cda 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -1855,7 +1855,7 @@ public static function getParentActivity($activityId) { * * @param $activityID * Current activity id. - * + * @deprecated * @return int * $params count of prior activities otherwise false. * @throws \CRM_Core_Exception diff --git a/CRM/Utils/PDF/Utils.php b/CRM/Utils/PDF/Utils.php index 923452c10eb0..c5cf7003f1ea 100644 --- a/CRM/Utils/PDF/Utils.php +++ b/CRM/Utils/PDF/Utils.php @@ -112,6 +112,7 @@ public static function html2pdf($text, $fileName = 'civicrm.pdf', $output = FALS /** * Convert html to tcpdf. * + * @deprecated * @param $paper_size * @param $orientation * @param $margins