Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for core config installer #3624

Closed
neclimdul opened this issue Jul 19, 2018 · 3 comments
Closed

Add support for core config installer #3624

neclimdul opened this issue Jul 19, 2018 · 3 comments

Comments

@neclimdul
Copy link
Contributor

Description

Thanks to https://www.drupal.org/project/drupal/issues/2788777 and https://www.drupal.org/project/drupal/issues/2980670 core now supports installing directly from config without the need of a profile. This doesn't just happen out of the box, there is a new config_install_path parameter in install_state that toggles a lot of behaviors in the installer.

To support installing from config in Drush, SiteInstallCommands will need to be updated to support providing this.

Goal

To supporting installing from config directly in Drush.

@neclimdul
Copy link
Contributor Author

open source rocks. already a pull request!

I poked at this a little too and there are actually 2 ways to trigger the behavior. The pull request is the most explicit but you can also have the installer use the default directory with a different parameter.

Seems like its worth supporting both so I'll look at pulling together a pull request.

Trivial POC patch looked like this:

diff --git a/src/Commands/core/SiteInstallCommands.php b/src/Commands/core/SiteInstallCommands.php
index 615979b6..06962834 100644
--- a/src/Commands/core/SiteInstallCommands.php
+++ b/src/Commands/core/SiteInstallCommands.php
@@ -81,6 +81,7 @@ class SiteInstallCommands extends DrushCommands implements SiteAliasManagerAware
             'parameters' => [
                 'profile' => $profile,
                 'langcode' => $options['locale'],
+                'existing_config' => TRUE,
             ],
             'forms' => [
                 'install_settings_form' => [

@vpeltot
Copy link
Contributor

vpeltot commented Jul 23, 2018

@neclimdul I have added the --existing-config option to allow the installation from the config sync directory.
Please see the PR #3625

@weitzman
Copy link
Member

weitzman commented Aug 2, 2018

Lets discuss in PR

@weitzman weitzman closed this as completed Aug 2, 2018
weitzman pushed a commit that referenced this issue Aug 20, 2018
* #3624: Change usage of '--config-dir' site-install option.

* Change comment wording.

* Check drupal version for backward compatibility & add new existing-config option to use the config sync directory

* Fix checkstyle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants