Problem

  • hook_config_sync() implementations are duplicating some (but not all) code of a module's save and delete API functions.

Goal

  • No duplicated code.

Example

Proposed solution A

  1. Lock the configuration stores for writes during the import/sync operation.
  2. Use regular save and delete API functions in hook_config_sync() [which then perform all the regular operations].

Proposed solution B

  1. Drop the entire idea that the config system collectively writes all new config at the end of the import/sync operation.
  2. Instead, make hook_config_sync() implementations invoke regular module API functions, which write the config objects as usual.

Comments

catch’s picture

Status: Postponed » Closed (duplicate)