Installs the system module.
Separated from the installation of other modules so core system functions can be made available while other modules are installed.
function drupal_install_system() {
// Create tables.
drupal_install_schema('system');
// Immediately boot a kernel to have real services ready.
$kernel = new DrupalKernel('install', FALSE, drupal_classloader(), FALSE);
$kernel
->boot();
$system_path = drupal_get_path('module', 'system');
require_once DRUPAL_ROOT . '/' . $system_path . '/system.install';
$system_versions = drupal_get_schema_versions('system');
$system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED;
drupal_container()
->get('keyvalue')
->get('system.schema')
->set('system', $system_version);
// System module needs to be enabled and the system/module lists need to be
// reset first in order to allow config_install_default_config() to invoke
// config import callbacks.
// @todo Installation profiles may override the system.module config object.
config('system.module')
->set('enabled.system', 0)
->save();
// Clear out module list and hook implementation statics.
system_list_reset();
module_list_reset();
module_implements_reset();
config_install_default_config('module', 'system');
module_invoke('system', 'install');
}