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.
Problem/Motivation
The hook_shortcut_default_set hook expects an user account as argument, but the hook declaration does not specify any type for the $account argument.
Steps to reproduce
N/A
Proposed resolution
Declare AccountInterface as $account argument type.
Remaining tasks
Review, test?, commit.
User interface changes
N/A
API changes
The described correction.
Data model changes
N/A
Release notes snippet
TBD.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3263201-2.patch | 1.02 KB | manuel.adan |
Comments
Comment #2
manuel.adanComment #3
victoria-marina CreditAttribution: victoria-marina at CI&T commentedI'll review this.
Comment #4
larowlanComment #5
victoria-marina CreditAttribution: victoria-marina at CI&T commentedAfter the #2, the argument is now specified as an AccountInterface type argument, and everything works fine as far I can test. RTBC!
Comment #7
manuel.adanBacked to RTBC, automatic re-test doesn't seem related to the patch itself.
Comment #11
xjm@victoria-marina, this is a documentation-only patch so there's not really anything to test beyond verifying that the documentation is accurate and conforms to the coding standards, and that there are no other similar instances in the same API that should be fixed as part of the same issue scope. :)
I checked and verified that there aren't any other missing parameter types in the Shortcut API docs (this is actually the only hook in the file). The hook return value correctly has one.
Committed to 10.0.x, and cherry-picked to 9.4.x and 9.3.x as a patch-eligible documentation improvement.
Thanks!