diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index aaf9792..7018c18 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -356,6 +356,11 @@ public function updateModules(array $module_list, array $module_filenames = arra $this->moduleData[$name] = $extension; } + // This method is called whenever the list of modules changed. Therefore + // disable loading of a dumped kernel from the disk, because it is + // guaranteed to be out of date and needs to be rebuilt anyway. + $this->allowLoading = FALSE; + // If we haven't yet booted, we don't need to do anything: the new module // list will take effect when boot() is called. If we have already booted, // then reboot in order to refresh the serviceProvider list and container.