Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a sub-issue of #1800046: [META] Add missing type hinting to core docblocks, fix Drupal.Commenting.FunctionComment.Missing* focused on correctly adding @param and @return type hinting to the menu_ui module.
Documentation patches that include type hinting are time consuming to both review and commit because one must dig into the actual code to confirm that the type hints are both correct and complete. Hence, please be patient and try to limit type hint patches to covering only a limited number of docblocks (10-15 as a guess).
How To Review This Issue
- Attempt to apply the patch to see if it needs a reroll.
- Use the phpcs one-liner to evaluate whether all the relevant standards errors have been resolved: https://gist.github.com/paul-m/227822ac7723b0e90647
- Look at each change and determine whether the type hint is correct.
Related sprint issues:
Beta phase evaluation
Unfrozen changes | Unfrozen because it only improves documentation. |
---|
Comment | File | Size | Author |
---|---|---|---|
#5 | 1800774_5.patch | 1.41 KB | Mile23 |
#1 | 1800774-1-th-menu-api.patch | 1.51 KB | Lars Toomre |
Comments
Comment #1
Lars Toomre CreditAttribution: Lars Toomre commentedAttached is a small patch that adds type hinting to the hook examples in menu.api.php. This is untested locally, but should pass since all of the changes are in comments. Let's see what the bot thinks.
Comment #4
Mile23Comment #5
Mile23Since there's no such thing as the menu module any more, I'll hijack this for menu_ui module.
It only changes docblock type hinting, so it's a documentation issue.
Comment #6
Mile23Patch still applies, phpcs says no missing hints.
Comment #7
Mile23Still applies.
Comment #8
Mile23Comment #9
ashutoshsngh CreditAttribution: ashutoshsngh at Srijan | A Material+ Company commentedPatch applies well moving to rtbc.
Comment #10
xjm@ashutoshsngh, the testbot checks that the patch applies for us. What we should do is confirm that the changes in each patch are correct.
I carefully read the code in
MenuForm
to confirm that the parameter typehints there were correct. Thanks @Mile23! This patch contains only documentation fixes, so can be accepted any time during the beta. Committed and pushed to 8.0.x