- Issue created by @mstrelan
- Merge request !9931Issue #3483065: Add void return type to all hook_form_alter, hook_form_FORM_ID_alter and hook_form_BASE_FORM_ID_alter implementations β (Closed) created by mstrelan
- πΊπΈUnited States smustgrave
Seems straight forward. Applied the MR and did a search for those functions and believe all have been hit.
- π³πΏNew Zealand quietone
Applied the diff then searched using the grep in the IS and that these have not been changed. Why is that?
$ grep "Function .*_form_.*_alter\\\\.* has no return type specified" core/.phpstan-baseline.php 'message' => '#^Function content_moderation_entity_form_display_alter\\(\\) has no return type specified\\.$#', 'message' => '#^Function inline_form_errors_element_info_alter\\(\\) has no return type specified\\.$#', 'message' => '#^Function layout_builder_entity_form_display_alter\\(\\) has no return type specified\\.$#', 'message' => '#^Function media_library_form_overwrite_test_media_source_info_alter\\(\\) has no return type specified\\.$#', 'message' => '#^Function entity_test_entity_form_display_alter\\(\\) has no return type specified\\.$#', 'message' => '#^Function entity_test_entity_form_mode_alter\\(\\) has no return type specified\\.$#', 'message' => '#^Function entity_test_entity_form_mode_info_alter\\(\\) has no return type specified\\.$#', 'message' => '#^Function claro_theme_suggestions_form_element_alter\\(\\) has no return type specified\\.$#',
- π¦πΊAustralia mstrelan
None of the functions in #5 are form alters, but their names are similar to form alters. For example some of them implement
hook_entity_form_display_alter
and others have the word "form" in the module name and alter some other hook. - πΊπΈUnited States nicxvan
Took a look and can confirm the identified errors are not form alters.
The Needs Review Queue Bot β tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- πΊπΈUnited States nicxvan
Ok, gotta rebase again, the entity type alter just got in
- π¬π§United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 11.1.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.