@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 :).

CommentFileSizeAuthor
module-list-register.patch544 bytesfubhy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fubhy’s picture

Priority: Normal » Critical

Marking as critical. Sorry :/

sun’s picture

Priority: Critical » Normal
Status: Needs review » Reviewed & tested by the community

This partially duplicates #1780396: Namespaces of disabled modules are registered during test runs, but the very focused change here is correct.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Could 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.

sun’s picture

Status: Needs work » Reviewed & tested by the community

Can we handle that in a follow-up, please?

We have #1806988: Factor out duplicate code from system_list() for that already.

catch’s picture

Status: Reviewed & tested by the community » Fixed

OK. Committed/pushed this one, bumped the other to major.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.