drupal_check_incompatibility($v, $current_version)
Checks whether a version is compatible with a given dependency.
$v: A parsed dependency structure e.g. from ModuleHandler::parseDependency().
$current_version: The version to check against (like 4.2).
NULL if compatible, otherwise the original dependency version string that caused the incompatibility.
\Drupal\Core\Extension\ModuleHandler::parseDependency()
function drupal_check_incompatibility($v, $current_version) { if (!empty($v['versions'])) { foreach ($v['versions'] as $required_version) { if ((isset($required_version['op']) && !version_compare($current_version, $required_version['version'], $required_version['op']))) { return $v['original_version']; } } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!common.inc/function/drupal_check_incompatibility/8.1.x