convert remaining calls, and php errors/exceptions don't support
authordemeritcowboy <demeritcowboy@hotmail.com>
Wed, 23 Dec 2020 00:14:14 +0000 (19:14 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Wed, 23 Dec 2020 21:35:13 +0000 (16:35 -0500)
placeholders

CRM/Core/DAO.php
Civi/Angular/Manager.php

index 0e248c5dda6bb98d21a85f18f221182e53624ad0..4fb383276f0d7430a9da388f6edf4d5be3e43b9b 100644 (file)
@@ -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);
   }
 
index 2ecf2f1514d41a22f32e278face614dd819adbb6..7a075d585b29fa45cc272e9c0cffea97f3a0320f 100644 (file)
@@ -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']));