Refactor updates for Varbase Bootstrap Paragraphs by moving hook updates to include/updates with load Include based on major branches

Created on 9 November 2023, about 1 year ago
Updated 12 December 2023, about 1 year ago

Problem/Motivation

Having old hook updates back from ~8.0, ~9.0.0, and ~10.0.0 in the same location in the varbase_bootstrap_paragraphs.install file.

Which brings number of conflicting issues for order of hooks when committing, and updating a miner or batch fix release.
Having issues when updating an old version in the old branch, then the latest branch has to shift and have the old hook updates before.
To prevent issues when upgrading to a major release.

Proposed resolution

Keep all hook updates, but archive them.
not to remove any of them

  • Add the include/updates folder into the module.
  • Move hook updates to include/updates/v9.inc, include/updates/v10.inc
  • Add the include/updates/all.inc file and add the following:
            \Drupal::moduleHandler()->loadInclude('varbase_bootstrap_paragraphs', 'inc', 'include/updates/v9');
            \Drupal::moduleHandler()->loadInclude('varbase_bootstrap_paragraphs', 'inc', 'include/updates/v10');
        
  • Add the following to the varbase_bootstrap_paragraphs.install file
    \Drupal::moduleHandler()->loadInclude('varbase_bootstrap_paragraphs', 'inc', 'include/updates/all');

Add more inc includes for more update files when needed.

Remaining tasks

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3400356 : Refactored updates for Varbase Bootstrap Paragraphs by moving hook updates to include/updates with load Include based on major branches
📌 Task
Status

Fixed

Version

10.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

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

Comments & Activities

Production build 0.71.5 2024