-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix #3624: Change usage of '--config-dir' site-install option. #3625
Conversation
Thanks. We do need to remain compatible with 8.5 sites for a good while. if needed, you can tell what version of Drupal we are dealing with via
|
…nfig option to use the config sync directory
@weitzman I forgot that there is a lot of Drupal not up to date 😄 So, here a new commit to keep the backward compatibility + add new option to allow the installation from the config sync directory ( |
I tested the PR branch in one of my projects with Drupal 8.6.0-alpha1 and it worked. 🎉 We are using https://github.com/openeuropa/task-runner on that project, and the drush option would have to be added there too. For others finding this, for now I just added the following to runner.yml for the normal
|
The code looks fine, but it is confusing to see two options which do nearly the same thing. Would it be too thorny to reuse same option and have its behavior be different with 8.6+? |
I don't know, they seem different to me but we're probably thinking about it differently.
|
I think those are too similar and will confuse |
Tested the --existing-config option. If I don't specify the "minimal" profile Drush assumes "standard" even though the existing config has "minimal" set in core.extensions.yml. The same is true when using --config-dir option. Does Drush need to know the profile when installing via config? If so, then it should probably read from config. But this is minor enough that I'd RTBC the current version if it will expedite getting this released before 8.6.0. People are going to need this asap to start using 8.6 since config-installer no longer exists. Regarding the --existing-config vs --config-dir: they do different things. I agree they are somewhat similar but I also think they are properly named. --config-dir is the drush-only compatibility option for previous users. I don't expect people to use this much in 8.6+ workflow as the config sync should be set in settings.php already. --existing-config is the name of the new option in core so you don't want Drush changing this. |
Thanks for testing. I'm warming up to the two option solution. Maybe we explicitly say that Where is |
I bet that Drush does not need to pass a profile to install_drupal() when using the new --existing-config code path. Thats a bug we should fix in this PR. Its probably wise to leave the --config-dir code path alone as changes can mess up existing sites. |
existing_config was added in the patch committed to 8.6 here: https://www.drupal.org/project/drupal/issues/2980670 |
Yes, both methods where explicitly added as part of that patch. |
Yes, it looks like Drush is passing Standard. Maybe we can just remove the fallback to Standard and let Drupal handle it? See drush/src/Commands/core/SiteInstallCommands.php Lines 137 to 173 in 2c9a38d
|
Lets keep working on option descriptions and default profile in new PRs. |
Fix #3624
Regarding https://www.drupal.org/project/drupal/issues/2788777 that allow a site to be installed from an existing configuration from 8.6.x version, here an update to change the usage of
--config-dir
option.Up to now, this option allowed to import a full set of configuration after installation.
From now, configuration does not import anymore after installation, but during installation.