- ๐บ๐ธUnited States nicxvan
Unfortunately you hit this section of the CR:
Breaking changes
Conditionally defined hook implementations are not supported.I'll reply more fully on the other issue since this is getting towards the comment limit.
- ๐ฏ๐ตJapan ptmkenny
Did this change the behavior of
hook_module_implements_alter()
? I'm getting a container initialization failure in the Field Encrypt module due to a \Drupal call: ๐ Container not initialized in module_implements_alter() Active -
kristiaanvandeneynde โ
committed 57cb792c on 1.0.x authored by
ekes โ
Issue #3437912 by ekes, kristiaanvandeneynde: Helper method/service/...
-
kristiaanvandeneynde โ
committed 57cb792c on 1.0.x authored by
ekes โ
- ๐ฉ๐ชGermany geek-merlin Freiburg, Germany
Yes, this would help a lot. Also, the restriction to the
Hooks
namespace is problematic even in modules:I implemented hundreds of hooks in the hux POC, where there was the choice to use either the Hooks namespace with auto-service registration, or ANY service. In >90% of the cases, from a code organization perspective, the hook was best to live where it belonged semantically, not in the Hooks namespace.
Or stated it differently: For sane code organization, restrikting hooks to Drupal\my_module\Hooks is the same PITA as to have to put them in the module file.