- Issue created by @drunken monkey
- Assigned to sayan_k_dutta
- Merge request !217Issue #3489482: Added hook class implementation for hooks in .module files. โ (Closed) created by sayan_k_dutta
- Merge request !218Issue #3489482: Added hook class implementation for hooks in .module files. โ (Open) created by sayan_k_dutta
- ๐ฎ๐ณIndia sayan_k_dutta
sayan_k_dutta โ changed the visibility of the branch 3489482-switch-to-oop to hidden.
- ๐ฎ๐ณIndia sayan_k_dutta
sayan_k_dutta โ changed the visibility of the branch 3489482-switch-to-oop to active.
- ๐ฎ๐ณIndia sayan_k_dutta
Working further to convert the views_hooks in oop implementation.
- ๐ฆ๐นAustria drunken monkey Vienna, Austria
Thanks a lot for your work on this, great job so far! However, there are still a couple of problems, as evidenced by the failing tests:
- I think
SearchApiViewHooks
is missing aservices.yml
entry. - (Iโd also call that class
SearchApiViewsHooks
, as the module name is โViewsโ.) - I donโt think we can use
autowire
yet, but I just temporarily enabled testing against other Drupal versions in the fork to validate that assumption. - Services in the two
Hooks
classes should be accessed via dependency injection (which is also whyautowire
would even be needed, I think), not via the global\Drupal
class. As a rule, classes that are able to use dependency injection should not contain the string'\Drupal::'
.
I already implemented the first two items, but please address the last one as well as the failing MR pipelines.
- I think