Problem/Motivation

Drupal 11 introduced object-oriented hook implementations via the #[Hook] attribute (change record). Converting the module's procedural hooks to an OOP hook class improves structure, discoverability and testability, and aligns Varbase SEO with Drupal core.

Steps to reproduce

Proposed resolution

Move the convertible procedural hooks from varbase_seo.module into src/Hook/VarbaseSeoHooks.php with #[Hook('...')] attributes (form_node_form_alter, form_metatag_defaults_edit_form_alter, modules_installed, pathauto_punctuation_chars_alter). Install/update/schema hooks stay procedural.

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-9.2.0, varbase_seo-9.2.0

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • task: #3608315 Remove the #[LegacyHook] shims for full OOP hooks
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’s picture

Title: task: Convert the procedural hook implementations to OOP hook classes on the 10.1.x branch » task: Convert the procedural hooks to OOP hook classes in the Varbase SEO module
rajab natshah’s picture

Title: task: Convert the procedural hooks to OOP hook classes in the Varbase SEO module » Convert the procedural hooks to OOP hook classes in the Varbase SEO module

  • rajab natshah committed fb05a7f9 on 10.1.x
    task: #3608315 Convert the procedural hooks to OOP hook classes in the...

  • rajab natshah committed 005eebf4 on 9.2.x
    task: #3608315 Remove the #[LegacyHook] shims for full OOP hooks (9.2.x)
    
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue summary: View changes
Status: Active » Fixed
Issue tags: +varbase-9.2.0, +varbase_seo-9.2.0

✅ Released varbase_seo-9.2.0

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.

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.2.0

rajab natshah’s picture

Version: 10.1.x-dev » 9.2.x-dev
rajab natshah’s picture

Status: Fixed » Closed (fixed)

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