function update_fix_compatibility in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/includes/update.inc \update_fix_compatibility()
Disables any extensions that are incompatible with the current core version.
2 calls to update_fix_compatibility()
- CompatibilityFixTest::testFixCompatibility in core/
modules/ system/ src/ Tests/ Update/ CompatibilityFixTest.php - DbUpdateController::handle in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Returns a database update page.
File
- core/
includes/ update.inc, line 17 - Drupal database update API.
Code
function update_fix_compatibility() {
$extension_config = \Drupal::configFactory()
->getEditable('core.extension');
$save = FALSE;
foreach (array(
'module',
'theme',
) as $type) {
foreach ($extension_config
->get($type) as $name => $weight) {
if (update_check_incompatibility($name, $type)) {
$extension_config
->clear("{$type}.{$name}");
$save = TRUE;
}
}
}
if ($save) {
$extension_config
->set('module', module_config_sort($extension_config
->get('module')));
$extension_config
->save();
}
}