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

[drupal config:export] Support core setting config_exclude_modules #4267

Open
mariacha opened this issue Sep 15, 2020 · 1 comment
Open

[drupal config:export] Support core setting config_exclude_modules #4267

mariacha opened this issue Sep 15, 2020 · 1 comment

Comments

@mariacha
Copy link

Problem/Motivation

But the command drupal config:export does not honor that setting.

How to reproduce

  1. Enable a module, like devel on your local site.
  2. Add the devel module to the list of excluded configuration in your settings.local.php file:
$settings['config_exclude_modules'] = ['devel'];
  1. Export your site's config using drush>10 with drush cex OR using the admin interface at /admin/config/development/configuration/full/export. You should not have any devel.settings.yml files, and your core.extension.yml file should not reference the devel module.

  2. Now run drupal config:export.

  3. Notice that there is now a devel.settings.yml file (among other devel files), and your core.extension.yml lists devel as a module.

Solution

Drush added support for this to the 10.rc-3 version with this commit: drush-ops/drush@11cc24b. It looks like the magic is in an additional call with a parameter in the service, but I don't know how translatable that is to the drupal console:
drush-ops/drush@11cc24b#diff-688fa7217de68ca8060c51c10c1cd249R6

@bircher
Copy link

bircher commented Sep 16, 2020

The magic was added to drush here: drush-ops/drush#4061
when exporting simply use the export storage and when importing use the import transformer to transform the storage before passing it on to the config importer.
See also: https://www.drupal.org/node/3037022 and https://www.drupal.org/node/3066005#invoking-transformer

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

2 participants