Problem/Motivation

Varbase Dashboards is used by Varbase 9.2.x (Drupal ~11.4). Its varbase_dashboards.module still implements hooks procedurally (hook_page_attachments, hook_theme, hook_theme_registry_alter, hook_preprocess_HOOK) using \Drupal:: static calls.

Drupal 11 provides an object-oriented hook system (https://www.drupal.org/node/3442349); the CI composer job also builds on the template-default core rather than the pinned Drupal ~11.4.

Steps to reproduce

Proposed resolution

Move the module's hooks into an OOP src/Hook/VarbaseDashboardsHooks.php class with dependency injection (register in varbase_dashboards.services.yml), delete the procedural .module (keep only non-hook helpers if any).

Pin the CI composer job to Drupal 11.4.0 (job-level DRUPAL_CORE/IGNORE_PROJECT_DRUPAL_CORE_VERSION) so it validates on ~11.4, and keep the webship-js browser suite green.

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
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release varbase-10.1.1, varbase_dashboards-2.0.2

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed 273ee09d on 2.0.x
    refactor: #3609251 Convert hooks to the Drupal 11 OOP hook system and...

rajab natshah’s picture

Assigned: rajab natshah » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.1.1, +varbase_dashboards-2.0.2
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Issue summary: View changes
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.