Use the ModuleHandlerInterface instead of the ModuleHandler concrete implementation, because other modules might decorate this class and it would lead to some fatal error.
For example, with the hook_event_dispatcher module enabled, this patch caused a fatal error : https://www.drupal.org/project/hook_event_dispatcher/issues/3277301
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3308343-2.patch | 1.76 KB | renrhaf |
Comments
Comment #2
renrhafComment #3
renrhafComment #4
uditrawatComment #5
bobooon commented#2 is the correct implementation.
+1 RTBC
Comment #6
mkalkbrennerComment #9
mkalkbrenner