Problem/Motivation
https://www.drupal.org/project/drupal/issues/3483899#comment-15841078
The docblock return type hint for HookCollectorPass::collectAllHookImplementations(): @return \Drupal\Core\Extension\HookCollectorPass has the wrong namespace. It probably should be @return $this. Is it worth its own issue?
Pretty sure this qualifies for novice.
Steps to reproduce
Look at docblock
Proposed resolution
The method is static and returns a new instance of the class, so it should be @return static
Remaining tasks
Fix it
User interface changes
N/A
Introduced terminology
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
Issue fork drupal-3485117
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3485117-fix-return-type
changes, plain diff MR !10040
Comments
Comment #2
nexusnovaz commentedI'll take a quick look at this
Comment #4
nexusnovaz commentedHey, can MR !10040 please be reviewed. Pipelines had a couple of fails, but after a retest they were fine.
Thanks!
Comment #5
godotislateMy original suggestion from #3483899: hook_module_implements_alter hook_cache_flush can only be procedural was incorrect. Change should be
@return static.Comment #6
nexusnovaz commentedHey,
Thanks for that. I wasn't too sure about the return type but also wasn't sure what the correct answer was. Thanks for the link to the coding standards for this issue too! Setting back to needs review before pipeline has run, but it should be good!
Thanks
Comment #7
godotislatelgtm
Comment #10
catchCommited/pushed to 11.x and cherry-picked to 11.1.x, thanks!
Comment #13
nicxvan commentedUpdate credit