- Issue created by @nicxvan
- π¨πSwitzerland berdir Switzerland
I would assume that api module can't properly pick up #Hook methods, whether or not they have the Implements docblock, so I'd assume that's not really a blocker, it's already broken without that change.
What I think is a blocker of this is a coding standards issue to change the requirement around this. We need to change this bit: https://www.drupal.org/docs/develop/standards/php/api-documentation-and-... β .
That means we need an issue in this project: https://www.drupal.org/project/coding_standards β . See π± Allow constructor methods to omit docblocks Fixed for the example that changed the requirements around constructor params.
- π¨π¦Canada Charlie ChX Negyesi πCanada
> I would assume that api module can't properly pick up #Hook methods
A proof of concept for that already exists but we decided it's better to properly support attributes and then special case from there. Attribute support branch is up at [#344963], we need a test, I will write one when I get to it.
I'd like to get #Hook api support out by the time D11.1 lands. We will see whether time permits.
- π¨πSwitzerland berdir Switzerland
That was maybe a bit unclear, let me expand: "I assume that API module currently out of the box would not find class methods as hook implementations, whether or not there is a 'Implements hook_foo()' docblock and therefore having or not having those docblocks is not relevant or api.module. It needs adjustments to find those and these adjustments will not look at the comment string anymore.".