Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301224

Add hook_post_config_import_NAME after config import

$
0
0

Problem/Motivation

Drupal core has a hook_update_N() mechanism with which developers can fix the database. But often we also want to abuse it to deploy other changes. This can lead to the situation that we would like to import the configuration before running the update hooks. But this is a very bad idea and will not be possible in the future.

See #2762235: Ensure that ConfigImport is taking place without outstanding updates and #2628144: Ensure that ConfigImport is taking place against the same code base.

The use case for this is for example adding a new field and dynamically populating it during a particular deployment.

Proposed resolution

Add a hook_post_config_import_NAME called after a config import so that developers can easily write one-off hooks for deployments and still always run the update hooks before the config import.

Remaining tasks

User interface changes

none

API changes

new hooks.

Data model changes

none


Viewing all articles
Browse latest Browse all 301224

Trending Articles