function drupal_requirements_severity

Extracts the highest severity from the requirements array.

Parameters

array $requirements: An array of requirements, in the same format as is returned by hook_requirements().

Return value

int The highest severity in the array.

Deprecated

in drupal:11.2.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Extension\Requirement\RequirementSeverity::getMaxSeverity() instead.

See also

https://www.drupal.org/node/3410939

1 call to drupal_requirements_severity()
LegacyRequirementSeverityTest::testGetMaxSeverity in core/tests/Drupal/KernelTests/Core/Extension/LegacyRequirementSeverityTest.php
Tests get max severity.

File

core/includes/install.inc, line 682

Code

function drupal_requirements_severity(&$requirements) {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use ' . RequirementSeverity::class . '::maxSeverityFromRequirements() instead. See https://www.drupal.org/node/3410939', E_USER_DEPRECATED);
  return RequirementSeverity::maxSeverityFromRequirements($requirements)->value;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.