config_split_selective_patch
Adds selective config patching to Configuration Split when Do not patch dependents is enabled - export specific configuration as schema-aware patch files while keeping the rest of your split on familiar 1.x-style behaviour.
Features
Configuration Split 2.x can export differences between active and sync configuration as compact, schema-aware patch files (config_split.patch.*). That is the default in 2.x.
Many teams enabled Do not patch dependents to avoid a large, disruptive switch: with that option, dependents are fully split (as in 1.x) and items on the Partial Split list are stored as full config copies when values differ - not as patches.
This module adds a third field on each split: Partial Split (Patch). Configuration selected there is exported using Config Split’s patch strategy even when Do not patch dependents is checked.
What you gain:
- Gradually adopt Config Split 2.x patches on configuration you know and trust.
- Leave the rest of the split unchanged (full split, conditional split, no dependent patching).
- Wildcard support in the additional-configuration textarea (same as Configuration Split).
- If the same config appears on both Partial Split and Partial Split (Patch), the patch strategy wins.
Typical use cases:
- A long-running project with
no_patching: truethat wants to try patches on one or two low-risk config objects first. - A team where developers disagree on enabling global 2.x patching - selective patches build confidence before a wider rollout.
- Environment-specific overrides (e.g. one view or system.site tweak) that should stay in sync but export only the diff.
Post-Installation
- Enable the module:
drush en config_split_selective_patch(Configuration Split must already be enabled). - Go to Configuration → Development → Configuration Split (
/admin/config/development/configuration/config-split). - Edit an existing split (or create one).
- Under Advanced, enable Do not patch dependents.
- The Partial Split (Patch) fieldset appears. Select configuration to export as patch files, or add wildcard lines under Additional configuration.
- Save the split and export as usual (
drush cexor your existing config workflow).
Patch files appear in your split storage alongside other split config. Import behaviour is unchanged - Configuration Split already merges config_split.patch.* entries on import.
Behaviour summary:
- Do not patch dependents off → Partial Split (Patch) is hidden; standard Config Split 2.x behaviour applies.
- Do not patch dependents on + Partial Split → conditional full copy when values differ (unchanged).
- Do not patch dependents on + Partial Split (Patch) → patch files for selected config only.
Additional Requirements
- Configuration Split 2.x
- Drupal 10.3+ or 11
Recommended modules/libraries
- Chosen or Select2 All - improve the multiselect widgets on the Configuration Split edit form (supported by Configuration Split itself).
Similar projects
Configuration Split 2.x already supports patch-based partial splits when Do not patch dependents is disabled. This module does not replace Configuration Split; it extends it for projects that keep Do not patch dependents enabled but want patch export for a chosen subset of configuration.
There is no separate “patch only these files” setting in core Configuration Split when no-patching mode is on - that is the gap this module fills.
Supporting this Module
Please use the issue queue for bug reports and feature requests. Contributions via merge requests on Drupal.org are welcome.
Community Documentation
- Configuration Split documentation - background on splits, partial splits, and patching in 2.x.