- Issue created by @nedjo
See discussion in 💬 Is this compatible with Recipes? Active .
Drupal recipes → provide configuration. Currently, they can be reapplied but don't support a primary use case of Configuration Synchronizer.
As described in recipe developer documentation, if a recipe being applied provides configuration that already exists on a given site, "By default it requires that
they be identical in every detail, or it throws an error." A recipe developer can instead set a strict
option to FALSE
"to have the recipe runner skip the config import if it finds anything different." Two additional options provided by Configuration Synchronizer for extension-provided configuration are not supported:
There is a set of issues open on Drupal core that together would provide a solution in core modelled on some of the approaches in Configuration Synchronizer. These issues include:
Unless and until solutions to those issues are developed and applied, there remains a use potential case for Configuration Synchronizer in recipes.
For extensions, we currently support an all-at-once, site-wide configuration update which applies by default to all installed extensions (though see ✨ Support running configuration synchronization on extension code update Active for a possible approach to per-extension configuration updates). There is no use case for running a configuration synchronization when an extension is first installed, since either (a) its configuration will be installed as provided or (b) the extension installer will raise a PreExistingConfigException.
With recipes, however, there are scenarios where synchronization would ideally occur at the time a recipe is applied, regardless of whether this is the first application or a subsequent one:
strict: true
and existing configuration differs from that provided by the recipe, Configuration Synchronizer could potentially intervene to prevent the recipe exception, gracefully merge provided config into the active configuration storage, and allow recipe application to proceed.strict: false
and existing configuration differs from that provided by the recipe, Configuration Synchronizer could potentially intervene to gracefully merge provided config into the active configuration storage so that potential changes in the recipe-provided config are not lost.See child issues of this issue.
Active
3.0
Code