- ๐ฌ๐งUnited Kingdom millnut
We've just hit this doing an upgrade from Drupal 9.5 to Drupal 10 where deprecated hooks are not flagged in upgrade status.
Is there any recent update on progress with getting upgrade status to detected deprecated hooks?
Failing that is there a way to get a full list of all hooks deprecated in 9.x and removed in 10?
- ๐บ๐พUruguay fanton Uruguay
In Drupal 9, there are only 4 deprecated hooks (you can verify this here):
- hook_field_widget_form_alter
- hook_field_widget_multivalue_form_alter
- hook_field_widget_multivalue_WIDGET_TYPE_form_alter
- hook_field_widget_WIDGET_TYPE_form_alterWhile it would be great to have automatic detection of deprecated hooks, since this feature is not available for now, it should be mentioned in the Upgrade Status feature list so that users are aware that they need to verify it manually.
- ๐ญ๐บHungary Gรกbor Hojtsy Hungary
See https://github.com/mglaman/phpstan-drupal/issues/126 for discussion on doing this in phpstan-drupal. I relayed your info @fanton to there. While we could write one-off code for these in Upgrade Status, it would be more universal to cover it in phpstan-drupal.
- Status changed to Active
over 1 year ago 5:52pm 20 September 2023 - ๐บ๐ธUnited States jnicola
Just ran into this issue, thankfully we have really good test coverage that caught the issue.
Specifically our issue was with hook_field_widget_WIDGET_TYPE_form_alter
Google for "Drupal 10 deprecated hooks" does not yield any useful information on this topic either.