Move config import-related events out of ConfigEvents, into a new ConfigImporterEvents

Created on 5 December 2023, 7 months ago
Updated 28 December 2023, 6 months ago

Problem/Motivation

In the wake of πŸ› Config collections do not trigger configuration events consistently Fixed , we realized that the config events are all lumped into one class (\Drupal\Core\Config\ConfigEvents), which is a bit overloaded. In particular, these events:

  • \Drupal\Core\Config\ConfigEvents::IMPORT_VALIDATE
  • \Drupal\Core\Config\ConfigEvents::IMPORT
  • \Drupal\Core\Config\ConfigEvents::IMPORT_MISSING_CONTENT
  • \Drupal\Core\Config\ConfigEvents::STORAGE_TRANSFORM_IMPORT
  • \Drupal\Core\Config\ConfigEvents::STORAGE_TRANSFORM_EXPORT

All of these operate on complete storages, not on individual config objects, regardless of which collection they're in. They should probably be moved to their own class to make it clearer what they're for -- Drupal\Core\Config\ConfigImportEvents or ConfigStorageEvents. Name TBD.

Proposed resolution

Move the constants I just listed into a new class, and deprecate the old ones.

Remaining tasks

Well, just moving code around and adding some deprecation comments, really.

API changes

Yes, this will deprecate some existing event constants.

Release notes snippet

TBD but we'll likely need something here.

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated less than a minute ago

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024