Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
@see title. module_list() has a $fixed_list argument which, when given, skips system_list() which normally would register module namespaces with the classloader. So if given a fixed list the namespaces will currently never be registered. The attached patch should fix that. Credit goes to alexpott for taking the time to debug this with me for 2 hours to make my tests go green :).
Comment | File | Size | Author |
---|---|---|---|
module-list-register.patch | 544 bytes | fubhy | |
Comments
Comment #1
fubhy CreditAttribution: fubhy commentedMarking as critical. Sorry :/
Comment #2
sunThis partially duplicates #1780396: Namespaces of disabled modules are registered during test runs, but the very focused change here is correct.
Comment #3
catchCould we move this to a helper function called from both system_list() and module_list()? Having the same lines in the two different functions obviously isn't helping to keep them in sync.
Comment #4
sunCan we handle that in a follow-up, please?
We have #1806988: Factor out duplicate code from system_list() for that already.
Comment #5
catchOK. Committed/pushed this one, bumped the other to major.