diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php index 98ad684dec2d..b4e2b860a77e 100644 --- a/core/modules/system/system.post_update.php +++ b/core/modules/system/system.post_update.php @@ -183,6 +183,9 @@ function system_post_update_states_clear_cache() { * Initialize 'expand_all_items' values to system_menu_block. */ function system_post_update_add_expand_all_items_key_in_system_menu_block(&$sandbox = NULL) { + if (!\Drupal::moduleHandler()->moduleExists('block')) { + return; + } \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'block', function ($block) { return strpos($block->getPluginId(), 'system_menu_block:') === 0; }); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.6.0.bare.testing.php.gz b/core/modules/system/tests/fixtures/update/drupal-8.6.0.bare.testing.php.gz new file mode 100644 index 000000000000..85fd276e3723 Binary files /dev/null and b/core/modules/system/tests/fixtures/update/drupal-8.6.0.bare.testing.php.gz differ diff --git a/core/modules/system/tests/src/Functional/Update/NoDependenciesUpdateTest.php b/core/modules/system/tests/src/Functional/Update/NoDependenciesUpdateTest.php new file mode 100644 index 000000000000..152d66780039 --- /dev/null +++ b/core/modules/system/tests/src/Functional/Update/NoDependenciesUpdateTest.php @@ -0,0 +1,36 @@ +databaseDumpFiles = [ + __DIR__ . '/../../../../tests/fixtures/update/drupal-8.6.0.bare.testing.php.gz', + ]; + } + + /** + * Test the system module updates with no dependencies installed. + */ + public function testNoDependenciesUpdate() { + $this->runUpdates(); + } + +}