Switch from Drupal module load Include to native PHP include once for Varbase FAQs to include all helpers and updates

Created on 5 December 2023, 12 months ago
Updated 12 December 2023, 12 months ago

Problem/Motivation

Having old hook updates back from ~9, and ~10 in the same location in the varbase_faqs.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 includes/updates folder into the module.
  • Move hook updates to includes/updates/v9.inc, includes/updates/v10.inc
  • Add the includes/updates.inc file and add the following:
           include_once __DIR__ . '/updates/v9.inc';
           include_once __DIR__ . '/updates/v10.inc';
        
  • Add the following to the varbase_faqs.install file
          // Include all helpers and updates.
          include_once __DIR__ . '/includes/helpers.inc';
          include_once __DIR__ . '/includes/updates.inc';
      
  • Add includes/helpers.inc and have all custom helper functions in the file.

Add more inc includes for more update files when needed.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-9.0.17 , varbase_faqs-9.0.9 , varbase-9.1.0 , varbase_faqs-9.1.1 , varbase-10.0.0-rc1 , varbase_faqs-10.0.0-beta2

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 #3406150 : Switched from Drupal module load Include to native PHP include once for Varbase FAQs to include all helpers and updates
📌 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