From 51feb18e051fb1867201ae3c110bc326d6e871ed Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 22 Dec 2020 19:14:14 -0500 Subject: [PATCH] convert remaining calls, and php errors/exceptions don't support placeholders --- CRM/Core/DAO.php | 2 +- Civi/Angular/Manager.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 0e248c5dda..4fb383276f 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -126,7 +126,7 @@ class CRM_Core_DAO extends DB_DataObject { */ public static function getEntityTitle() { $className = static::class; - Civi::log()->warning("$className needs to be regenerated. Missing getEntityTitle method.", ['civi.tag' => 'deprecated']); + CRM_Core_Error::deprecatedWarning("$className needs to be regenerated. Missing getEntityTitle method."); return CRM_Core_DAO_AllCoreTables::getBriefName($className); } diff --git a/Civi/Angular/Manager.php b/Civi/Angular/Manager.php index 2ecf2f1514..7a075d585b 100644 --- a/Civi/Angular/Manager.php +++ b/Civi/Angular/Manager.php @@ -180,6 +180,7 @@ class Manager { * @return array * List of Angular modules, include all dependencies. * Ex: array('crmMailing', 'crmUi', 'crmUtil', 'ngRoute'). + * @throws \CRM_Core_Exception */ public function resolveDependencies($names) { $allModules = $this->getModules(); @@ -189,10 +190,7 @@ class Manager { foreach ($missingModules as $module) { $visited[$module] = 1; if (!isset($allModules[$module])) { - \Civi::log()->warning('Unrecognized Angular module {name}. Please ensure that all Angular modules are declared.', [ - 'name' => $module, - 'civi.tag' => 'deprecated', - ]); + throw new \CRM_Core_Exception("Unrecognized Angular module {$module}. Please ensure that all Angular modules are declared."); } elseif (isset($allModules[$module]['requires'])) { $result = array_unique(array_merge($result, $allModules[$module]['requires'])); -- 2.25.1