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
Issue fork vartheme_claro-3608377
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
Comment #3
rajab natshahComment #7
rajab natshah✅ Released vartheme_claro-3.1.0