Consider adding a VersionedConfigEntityBase

Created on 3 June 2025, about 1 month ago

Problem/Motivation

Experience Builder has a need for versioned properties on a config entity.

For example, for its Component config entity, the following are immutable properties and hence are not versioned:

  • id
  • source (the ID of a ComponentSource plugin)
  • source_local_id (the ID of a component within that source: could be a plugin ID if the source is powered by plugins such as block plugins, could be a config entity ID if it's powered by config entities, could be a URL if it's powered by remotely discovered components, etc.)

… but the settings for each Component config entity need to be versioned, because it is impossible to automatically and efficiently update millions of existing instances of that Component config entity to reflect:

  • updated default configuration of a block plugin that added a new configuration key-value pair
  • updated choices which field types to store the data in for an SDC prop (e.g. stop using the link field type and start using the uri field type, or vice versa)

Steps to reproduce

N/A

Proposed resolution

Introduce:

  • VersionedConfigEntityInterface extends ConfigEntityInterface
  • VersionedConfigEntityBase with methods to make this easy, with most crucially: ::loadVersion(), ::createVersion() and an overridden ::set() that handles differently
  • config schema: type: versioned_config_entity which extends core's existing type: config_entity

Remaining tasks

Discuss :)

User interface changes

None.

Introduced terminology

See above.

API changes

TBD

Data model changes

TBD

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

configuration entity system

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

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

Comments & Activities

Production build 0.71.5 2024