diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index 9c73eb7e8415..cdac188f0b9d 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -600,7 +600,11 @@ public function checkExtensions() { return $messages; } - $keys = array_keys($manager->getStatuses()); + $stauses = $manager->getStatuses(); + $keys = array_keys($stauses); + $enabled = array_keys(array_filter($stauses, function($status) { + return $status === CRM_Extension_Manager::STATUS_INSTALLED; + })); sort($keys); $updates = $errors = $okextensions = []; @@ -619,7 +623,10 @@ public function checkExtensions() { break; case CRM_Extension_Manager::STATUS_INSTALLED: - if (!empty($remotes[$key]) && version_compare($row['version'], $remotes[$key]->version, '<')) { + if (!empty($row['requires']) && array_diff($row['requires'], $enabled)) { + $errors[] = ts('%1 extension depends on %2, which is not enabled.', [1 => $row['label'] ?? $key, 2 => implode(', ', array_diff($row['requires'], $enabled))]); + } + elseif (!empty($remotes[$key]) && version_compare($row['version'], $remotes[$key]->version, '<')) { $updates[] = $row['label'] . ': ' . $mapper->getUpgradeLink($remotes[$key], $row); } else {