Config Filter is the new module that provides the basic component that makes config split shine.
It provides a plugin config_split can use. That way we can stop maintaining custom drush commands.

Members fund testing for the Drupal project. Drupal Association Learn more


bircher created an issue. See original summary.

  • bircher committed fb73075 on 8.x-1.x
    Issue #2855319 by bircher: Refactor to depend on config_filter
swentel’s picture

hmm, I'd -1 one this, especially because there's already a beta release .. kind of of annoying for users having to switch ...
I would make this optional somehow because I currently swap this myself.

  • bircher committed bbed547 on 8.x-1.x
    Issue #2855319 by bircher: add update hook to enable config_filter
bkosborne’s picture

Glad to see progress on this. This would allow users to use drush config-export and drush config-import in a way that's compatible with config split?

bircher’s picture

Status: Active » Fixed

Yes the latest dev version of config_split works with the default cim and cex of the latest drush version (both 8.x and master), so the next tagged release of drush will be compatible with the config_filter and config_split combo.

bkosborne’s picture

Drush 8.1.10 was just tagged yesterday, so that's great news! I'll give this a whirl sometime today.

bircher’s picture

ah fantastic! yes they tagged it right after merging the PR that makes it work with it. Great news! please test the latest dev version of config_split, I'll tag a new release then soon.

bkosborne’s picture

My current site uses just one config sync directory, located in ../config/default. I've been exporting and importing all config from this one directory on all environments.

Here's what I've done to test the new drush integration:

1. Updated to drush 8.1.10
2. Downloaded and enabled the latest dev of config_split and config_filter
3. Configured a config split config entity for "development" with config dir ../config/development and selected the devel module and it's config.
4. Simply ran drush config-export on my local environment. Here's what I get (notice the warnings):

5. Update some of the devel config that's in the ../config/development, and ran drush config-import. This detected the change to the devel config and imported it.

So, it seems that drush is indeed aware of config split now.

But how do I do an export/import without it using the development split? Like when I deploy to production, what command do I use?

bircher’s picture

on production you set in your settings php the split to inactive. Or you make the split inactive in your config and you set it to active in settings.php in the development environment.


the part relevant here is: $config['config_split.config_split.development']['status'] = FALSE;

Whether it is active or not matters *before* the import, just like a split is not taken into consideration when you import it the first time the active state is the one the site knows before synchronising the configuration.

I'll check the warnings, thanks for pointing them out!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.