summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/update/update.fetch.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/update/update.fetch.inc')
-rw-r--r--core/modules/update/update.fetch.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc
index 2c828cc3e7f..12295b97d98 100644
--- a/core/modules/update/update.fetch.inc
+++ b/core/modules/update/update.fetch.inc
@@ -4,7 +4,8 @@
* @file
*/
-use Drupal\Core\Hook\Attribute\StopProceduralHookScan;
+use Drupal\Core\Hook\Attribute\ProceduralHookScanStop;
+use Drupal\Core\Extension\Requirement\RequirementSeverity;
use Drupal\update\UpdateManagerInterface;
/**
@@ -16,17 +17,16 @@ use Drupal\update\UpdateManagerInterface;
*
* @see update_requirements()
*/
-#[StopProceduralHookScan]
+#[ProceduralHookScanStop]
function _update_cron_notify(): void {
$update_config = \Drupal::config('update.settings');
- \Drupal::moduleHandler()->loadInclude('update', 'install');
- $status = update_requirements('runtime');
+ $status = \Drupal::moduleHandler()->invoke('update', 'runtime_requirements');
$params = [];
$notify_all = ($update_config->get('notification.threshold') == 'all');
foreach (['core', 'contrib'] as $report_type) {
$type = 'update_' . $report_type;
if (isset($status[$type]['severity'])
- && ($status[$type]['severity'] == REQUIREMENT_ERROR || ($notify_all && $status[$type]['reason'] == UpdateManagerInterface::NOT_CURRENT))) {
+ && ($status[$type]['severity'] == RequirementSeverity::Error || ($notify_all && $status[$type]['reason'] == UpdateManagerInterface::NOT_CURRENT))) {
$params[$report_type] = $status[$type]['reason'];
}
}