diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index 2ac6246f6f2f..f0a88a71624a 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -1106,4 +1106,25 @@ public function checkPHPIntlExists() { return $messages; } + public function checkAngularModuleSettings() { + $messages = []; + $modules = Civi::container()->get('angular')->getModules(); + foreach ($modules as $name => $module) { + if (!empty($module['settings'])) { + $messages[] = new CRM_Utils_Check_Message( + __FUNCTION__ . $name, + ts('The Angular file "%1" from extension "%2" must be updated to use "settingsFactory" instead of "settings". Developer info...', [ + 1 => $name, + 2 => $module['ext'], + 3 => 'target="_blank" href="https://github.com/civicrm/civicrm-core/pull/19052"', + ]), + ts('Unsupported Angular Setting'), + \Psr\Log\LogLevel::WARNING, + 'fa-code' + ); + } + } + return $messages; + } + }