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.inc11
1 files changed, 2 insertions, 9 deletions
diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc
index a0d2a22e5624..12295b97d986 100644
--- a/core/modules/update/update.fetch.inc
+++ b/core/modules/update/update.fetch.inc
@@ -5,6 +5,7 @@
*/
use Drupal\Core\Hook\Attribute\ProceduralHookScanStop;
+use Drupal\Core\Extension\Requirement\RequirementSeverity;
use Drupal\update\UpdateManagerInterface;
/**
@@ -19,21 +20,13 @@ use Drupal\update\UpdateManagerInterface;
#[ProceduralHookScanStop]
function _update_cron_notify(): void {
$update_config = \Drupal::config('update.settings');
- // This loadInclude() is to ensure that the install API is available.
- // Since we're loading an include of type 'install', this will also
- // include core/includes/install.inc for us, which is where the
- // REQUIREMENTS* constants are currently defined.
- // @todo Remove this once those constants live in a better place.
- // @see https://www.drupal.org/project/drupal/issues/2909480
- // @see https://www.drupal.org/project/drupal/issues/3410938
- \Drupal::moduleHandler()->loadInclude('update', 'install');
$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'];
}
}