Problem/Motivation

The Vartheme Claro hooks already live in the OOP Drupal\vartheme_claro\Hook\VarthemeClaroHooks class, but vartheme_claro.theme still keeps #[LegacyHook] backward-compat shims that delegate to that class. For Drupal ~11.4.0 these standard theme hooks are invoked by core only, so the shims are redundant.

Steps to reproduce

Review vartheme_claro.theme: every function is a #[LegacyHook] shim delegating to Drupal\vartheme_claro\Hook\VarthemeClaroHooks.

Proposed resolution

Remove the #[LegacyHook] shims and delete vartheme_claro.theme; all hook logic already lives in the OOP #[Hook] class (change record).

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, vartheme_claro-3.1.0

User interface changes

  • N/A

API changes

  • The #[LegacyHook] procedural shim functions are removed; the logic remains available on the OOP hook class service. Standard theme hooks invoked by core only.

Data model changes

  • N/A

Release notes snippet

  • task: #3608377 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

Issue summary: View changes

  • rajab natshah committed 77371e17 on 3.1.x
    task: #3608377 Remove the #[LegacyHook] shims for full OOP hooks (3.1.x)
    

rajab natshah’s picture

Issue summary: View changes
Status: Active » Fixed
Issue tags: +varbase-9.2.0, +vartheme_claro-3.1.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.

Status: Fixed » Closed (fixed)

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