Allow configuration entities to be ignored during import operations

Created on 17 August 2016, over 8 years ago
Updated 16 October 2023, about 1 year ago

I've come across a number of instances where I've wanted specific configuration entities to be ignored during configuration import operations. Our current workflow basically involves full config exports from local dev environments that get get imported to dev, staging, production environments. Most recently, using the YamlForm module I ran up against this again where I wanted certain YamlForm "template" forms (which are config entities) to get imported into production but also have forms that get spawned from these templates to get ignored during configuration import so they wouldn't get deleted when importing configurations that didn't contain the spawned entities. drush cim --partial was a potential workaround but introduced other issues into our workflow.

This patch lays groundwork in core for flagging individual configuration entities to be ignored during config imports allowing more flexibility in configuration workflows. Using YamlForm as an example, a YamlForm configuration entity can be created and set to be ignored by configuration like so:

$yamlForm = YamlForm::create($values);
$yamlForm->setImportIgnore(TRUE);
$yamlForm->save();

setImportIgnore() also has an option for making the ignore settings for the entity more granular by import operation (create, update, rename, or delete):

// Ignore config import for creation and updating only.
$yamlForm->setImportIgnore(TRUE, ['create', 'update']);

Having config import ignore flags set will prevent an entity's config from getting imported as well as prevent it from showing up in change lists.

Feature request
Status

Needs work

Version

11.0 🔥

Component
Configuration entity 

Last updated 3 days ago

Created by

🇺🇸United States aether

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024