Skip to content

Commit

Permalink
Merge pull request #19266 from demeritcowboy/is-development-2
Browse files Browse the repository at this point in the history
dev/core#2240 - Convert remaining two deprecatedWarning calls
  • Loading branch information
eileenmcnaughton authored Dec 28, 2020
2 parents a4b487a + 51feb18 commit cc420c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function __construct() {
*/
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);
}

Expand Down
6 changes: 2 additions & 4 deletions Civi/Angular/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public function getModule($name) {
* @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();
Expand All @@ -189,10 +190,7 @@ public function resolveDependencies($names) {
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']));
Expand Down

0 comments on commit cc420c1

Please sign in to comment.