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.
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
381 | WARNING | Doc comment indicates hook_form_alter() but function
| | signature is "THEMENAME_form_alter" instead of
| | "THEMENAME.info_form_alter". Did you mean
| | hook_form_FORM_ID_alter()?
----------------------------------------------------------------------
Comment | File | Size | Author |
---|---|---|---|
#4 | filename-issue-theme-extension-2935388-4.patch | 1.01 KB | jncruces |
#2 | filename-issue-theme-extension-2935388-2.patch | 879 bytes | miteshmap |
Comments
Comment #2
miteshmapComment #3
qzmenkoSame issue for me. I think it's normal situation what hook_form_alter may be used in theme.
Patch fixed problem.
Comment #4
jncrucesI have this problem too but this patch only add the "theme" extension but I get the warning in a "profile".
My patch based on #2 adds the profile extension to the validation.
Greetings.
Comment #5
jncrucesComment #6
dorficus CreditAttribution: dorficus commentedTested the patch in #4 and I was able to pass linting. Good job, everyone!
Comment #7
hugovk CreditAttribution: hugovk at Digia for Yle - Finnish Broadcasting Company commentedRTBC number 2:
Reproduced with latest Drupal 8.6.7 and Coder 8.3.1.
Confirmed patch #4 fixes it.
Any chance of a merge and release?
Thank you!
Comment #8
klausiI think this makes sense. Can you add test cases and file a pull request against https://github.com/pfrenssen/coder where the automated test cases are run? Thanks!
Comment #9
tmanhollan CreditAttribution: tmanhollan commentedSee the related issue, https://www.drupal.org/project/coder/issues/3066096. It has an open PR with tests and it resolves this issue as well, similarly to #4, but also addresses the .info.yml file.
Comment #10
pfrenssenThis has been fixed as part of #3066096: Project names calculated incorrectly for themes.