Commit e866c4cf authored by catch's avatar catch

Issue #2201785 by sun, Berdir: Remove drupal_flush_all_caches() from installer.

parent 4c83e776
......@@ -1512,7 +1512,6 @@ function install_profile_modules(&$install_state) {
'operations' => $operations,
'title' => t('Installing @drupal', array('@drupal' => drupal_install_profile_distribution_name())),
'error_message' => t('The installation has encountered an error.'),
'finished' => '_install_profile_modules_finished',
);
return $batch;
}
......@@ -1690,10 +1689,10 @@ function install_finished(&$install_state) {
// Installation profiles are always loaded last.
module_set_weight($profile, 1000);
// Flush all caches to ensure that any full bootstraps during the installer
// do not leave stale cached data, and that any content types or other items
// registered by the installation profile are registered correctly.
drupal_flush_all_caches();
// Build the router once after installing all modules.
// This would normally happen upon KernelEvents::TERMINATE, but since the
// installer does not use an HttpKernel, that event is never triggered.
\Drupal::service('router.builder')->rebuild();
// Run cron to populate update status tables (if available) so that users
// will be warned if they've installed an out of date Drupal version.
......@@ -1733,15 +1732,6 @@ function _install_module_batch($module, $module_name, &$context) {
$context['message'] = t('Installed %module module.', array('%module' => $module_name));
}
/**
* 'Finished' callback for module installation batch.
*/
function _install_profile_modules_finished($success, $results, $operations) {
// Flush all caches to complete the module installation process. Subsequent
// installation tasks will now have full access to the profile's modules.
drupal_flush_all_caches();
}
/**
* Checks installation requirements and reports any errors.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment