Background
src/Rules/Deprecations/DeprecatedHookImplementation.php was added in November 2023 but has never been registered in rules.neon or extension.neon. It silently does nothing for users of this package.
Problems
- Never registered — the rule is not wired into any neon config, so no one is getting its checks.
- Hardcoded and stale — the only specific deprecation it detects is
hook_field_widget_multivalue_form_alter (a Drupal 9→10 deprecation), hardcoded with a @todo acknowledging the approach is not extensible or intelligent.
- Superseded — Drupal 10+ hook deprecations are better handled via the Hook attribute system, which is already covered by other rules in this project.
Proposed resolution
Either:
- Remove
src/Rules/Deprecations/DeprecatedHookImplementation.php and its test tests/src/Rules/DeprecatedHookImplementationTest.php — the rule has never been active and the hardcoded hook it targets is an obsolete D9→D10 migration concern.
- Or register and rewrite it using a data-driven approach if detecting deprecated procedural hook implementations is still a desired feature.
Given the narrow scope and the stale hardcoded logic, removal is the cleaner path unless there is a concrete plan to generalize it.
Background
src/Rules/Deprecations/DeprecatedHookImplementation.phpwas added in November 2023 but has never been registered inrules.neonorextension.neon. It silently does nothing for users of this package.Problems
hook_field_widget_multivalue_form_alter(a Drupal 9→10 deprecation), hardcoded with a@todoacknowledging the approach is not extensible or intelligent.Proposed resolution
Either:
src/Rules/Deprecations/DeprecatedHookImplementation.phpand its testtests/src/Rules/DeprecatedHookImplementationTest.php— the rule has never been active and the hardcoded hook it targets is an obsolete D9→D10 migration concern.Given the narrow scope and the stale hardcoded logic, removal is the cleaner path unless there is a concrete plan to generalize it.