Commit f70f4f47 authored by catch's avatar catch

Issue #2969715 by alexpott, pookmish, dawehner: Drush site-install command...

Issue #2969715 by alexpott, pookmish, dawehner: Drush site-install command doesn't work when settings.php is present
parent 2f9be00c
...@@ -424,8 +424,11 @@ function install_begin_request($class_loader, &$install_state) { ...@@ -424,8 +424,11 @@ function install_begin_request($class_loader, &$install_state) {
} }
$GLOBALS['conf']['container_service_providers']['InstallerConfigOverride'] = 'Drupal\Core\Installer\ConfigOverride'; $GLOBALS['conf']['container_service_providers']['InstallerConfigOverride'] = 'Drupal\Core\Installer\ConfigOverride';
// Only allow dumping the container once the hash salt has been created. // Only allow dumping the container once the hash salt has been created. Note,
$kernel = InstallerKernel::createFromRequest($request, $class_loader, $environment, (bool) Settings::get('hash_salt', FALSE)); // InstallerKernel::createFromRequest() is not used because Settings is
// already initialized.
$kernel = new InstallerKernel($environment, $class_loader, (bool) Settings::get('hash_salt', FALSE));
$kernel::bootEnvironment();
$kernel->setSitePath($site_path); $kernel->setSitePath($site_path);
$kernel->boot(); $kernel->boot();
$container = $kernel->getContainer(); $container = $kernel->getContainer();
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Drupal\Core\Installer; namespace Drupal\Core\Installer;
use Drupal\Core\DrupalKernel; use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
/** /**
* Extend DrupalKernel to handle force some kernel behaviors. * Extend DrupalKernel to handle force some kernel behaviors.
...@@ -67,15 +66,4 @@ public function getInstallProfile() { ...@@ -67,15 +66,4 @@ public function getInstallProfile() {
return $profile; return $profile;
} }
/**
* {@inheritdoc}
*/
public static function createFromRequest(Request $request, $class_loader, $environment, $allow_dumping = TRUE, $app_root = NULL) {
// This override exists because we don't need to initialize the settings
// again as they already are in install_begin_request().
$kernel = new static($environment, $class_loader, $allow_dumping, $app_root);
static::bootEnvironment($app_root);
return $kernel;
}
} }
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