- Issue created by @mstrelan
- Merge request !10278Issue #3488823: Add void return to entity_crud hook implementations → (Closed) created by mstrelan
- 🇦🇺Australia mstrelan
Missed a few that don't have the right docs, i.e. "Implements hook_ENTITY_TYPE_":
- Drupal\block_content_test\Hook\BlockContentTestHooks::blockContentInsert()
- Drupal\block_content_test\Hook\BlockContentTestHooks::blockContentPresave()
- Drupal\block_content_test\Hook\BlockContentTestHooks::blockContentUpdate()
- Drupal\block_content_test\Hook\BlockContentTestHooks::blockContentView()
- Drupal\config_test\Hook\ConfigTestHooksHooks::configTestDelete()
- Drupal\config_test\Hook\ConfigTestHooksHooks::configTestInsert()
- Drupal\config_test\Hook\ConfigTestHooksHooks::configTestLoad()
- Drupal\config_test\Hook\ConfigTestHooksHooks::configTestPredelete()
- Drupal\config_test\Hook\ConfigTestHooksHooks::configTestPresave()
- Drupal\config_test\Hook\ConfigTestHooksHooks::configTestUpdate()
- 🇦🇺Australia mstrelan
I think
hook_entity_bundle_create
is meant to be in the entity_crud group too, but the doc has @see instead of @ingroup, which we should fix too. That would give us the following extras:- Drupal\field_ui\Hook\FieldUiHooks::entityBundleCreate()
- Drupal\jsonapi\Hook\JsonapiHooks::entityBundleCreate()
- Drupal\entity_schema_test\Hook\EntitySchemaTestHooks::entityBundleCreate()
And some more for the list in #4:
- \Drupal\field_ui\Hook\FieldUiHooks::entityViewModePresave
- \Drupal\field_ui\Hook\FieldUiHooks::entityFormModePresave
- \Drupal\field_ui\Hook\FieldUiHooks::entityViewModeDelete
- \Drupal\field_ui\Hook\FieldUiHooks::entityFormModeDelete
- 🇺🇸United States nicxvan
I'll finish reviewing later this is a lot.
In the meantime can you add any with incorrect implements comments here https://www.drupal.org/project/drupal/issues/3488948 📌 Confirm conversions where implements was incorrect Active
Across all of these hook issues? We need to confirm the hook still has the extra type.
- 🇺🇸United States nicxvan
Ok I took a look through and I don't see any other exceptions either.
- 🇦🇺Australia mstrelan
A few more:
\Drupal\image_module_test\Hook\ImageModuleTestHooks::imageStylePresave \Drupal\layout_builder\Hook\LayoutBuilderHooks::fieldConfigDelete \Drupal\layout_builder\Hook\LayoutBuilderHooks::fieldConfigInsert \Drupal\menu_link_content\Hook\MenuLinkContentHooks::menuDelete
- 🇺🇸United States nicxvan
\Drupal\layout_builder\Hook\LayoutBuilderHooks::fieldConfigDelete
\Drupal\layout_builder\Hook\LayoutBuilderHooks::fieldConfigInsertCan be combined:
Delete one Move the hook to the other along with the implements line to the other. Rename the method as well so it's not referencing one hook or the other!I also confirmed these ones, I'll move them to 📌 Confirm conversions where implements was incorrect Active for completeness.
- 🇦🇺Australia mstrelan
Re #9: there are plenty of hooks that could be refactored one way or another, but that's not really in scope here, so I'd prefer to leave that out.
- 🇦🇺Australia mstrelan
Rebased and updated those in #4, #5 and #8.
- 🇺🇸United States smustgrave
Needs a rebase
If you are another contributor eager to jump in, please allow the previous poster at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
- Status changed to Needs review
about 1 month ago 5:48am 21 January 2025 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.
- 🇦🇺Australia mstrelan
I think this also needs to update
layout_builder_test_node_view
, and the doc block should referencehook_ENTITY_TYPE_view
nothook_entity_node_view
. - First commit to issue fork.
- 🇮🇳India shalini_jha
Re base this MR and fixed the conflict . Also address the feedback mentioned #16. Regenerate Baseline. Pipeline is green so moving this back to NR. please review
- 🇺🇸United States smustgrave
I think this is fine. I'd be a little hesitant to want to expand scope much more. Know pretty simple changes but still a large number of files.
- 🇳🇿New Zealand quietone
Reviewing this is a bit more difficult because of the number of lines changed and the out of scope changes to the doc blocks. Changing the doc blocks in not mentioned in the Issue Summary, so that came as a surprise. Unlike a recent related issue where the out of scope changes were to comments, which I pushed back, these are just to the summary line. On one hand these are out of scope and on the other it makes sense to do it while 'we are here'. I lean to the latter.
I've used the script locally and confirmed it works as intended. I then reviewed each commit here and I found no problems.
-
quietone →
committed c7ebe845 on 11.x
Issue #3488823 by mstrelan, shalini_jha, smustgrave, nicxvan: Add void...
-
quietone →
committed c7ebe845 on 11.x