Posted by xjm

Problem/Motivation

This is a followup for #1810480: Provide the plugin_id to support views metadata integration. If a module that provides Views integrations has API changes--e.g., changed table names, changed plugin IDs, updated default Views, etc.--the module's active configuration also needs to be updated.

Proposed resolution

In general, it should be the individual module's responsibility to upgrade the stored data when needed. However, we should either provide an API for updating the active configuration, or document the correct way to update it.

Remaining tasks

This could either be solved in a general way for the configuration system, or specifically within Views, or we could just provide an example of how to update the active config. I've filed the issue against Views for now.

Related issues

Comments

dawehner’s picture

For most objects it would be enough to have a filter for the files, either by prefix or the filename itself,
and then some key-value replacements.

For more advanced use-cases like views you need custom code, as you have additional logic in the depths of objects you hardly can solve in a generic API. For example views has the concept of default values in one view config file,
so when you update certain bits, you might should be aware of that.

xjm’s picture

Issue summary: View changes

Removing myself from the author field so that I can unfollow the issue. --xjm

alexpott’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

If views implemented a change that requires updating all the views in active configuration it could use the Config API in a hook_update_N to do this. Note it should not using the Configuration entity API since that will unstable because at the point where the underlying data structure is not updated, the config entity object will be the new code.

Closing this issue because all of this is possible to do with the current API.