Improve hook_module_preinstall & hook_module_preuninstall to include recommendations for config import and pass an $is_syncing argument

Created on 6 March 2020, about 5 years ago
Updated 7 March 2023, about 2 years ago

Problem/Motivation

In #2914174: Improve hook_install() to include recommendations for config import and pass an $is_syncing argument β†’ $is_syncing parameters were introduced to hook_install, hook_uninstall, hook_modules_installed and hook_modules_uninstalled to check if the config was being synced while the hook was running, as creating/altering configuration entities can cause issues in these hooks.

In #3087130: Profile configuration should be able to depend on optional configuration provided by modules β†’ the currently proposed patch has if (!\Drupal::service('config.installer')->isSyncing()) inside hook_module_preinstall(). This is exactly what we wanted to avoid in this hook and replace with if (!$is_syncing)

Proposed resolution

Add the $is_syncing parameter to hook_module_preinstall & hook_module_preuninstall.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
ConfigurationΒ  β†’

Last updated 2 days ago

Created by

πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024