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.
Problem/Motivation
#2942769-2: Consolidate umami .htaccess files and testing. passed on 8.6.x but failed on 8.5.x because drupal_get_path('module', 'demo_umami_content')
is successful on 8.6.x but not in 8.5.x when the testing profile is used. The 8.5.x behaviour is correct.
Proposed resolution
Ensure that a profile's modules are not available to other profiles.
Remaining tasks
User interface changes
None
API changes
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#11 | 2945306-11.patch | 2.37 KB | alexpott |
#11 | 8-11-interdiff.txt | 638 bytes | alexpott |
#8 | 2945306-8.patch | 2.38 KB | alexpott |
#8 | 7-8-interdiff.txt | 612 bytes | alexpott |
#7 | 2945306-7.patch | 2.25 KB | alexpott |
Comments
Comment #2
alexpottOkay so the good news is that this appears to be a testing only issue. After installing standard on 8.6.x I can't get the path to demo_umami_content module.
Comment #3
alexpottSo the patch attach passes on 8.6.x but fails on 8.5.x therefore showing the behaviour difference.
Comment #4
alexpottI think we should take a defensive position with the installer service providers and use drupal_installation_attempted() since this means that only the global install_state and this function determines if we are installing or not.
Also the new behaviour in KernelTestBase tests is probably desired since it makes it easier for modules provided by profiles to have kernel tests.
Comment #6
dawehnerWhile I agree that we should be defensive here, I also believe we should actually reset the globals as soon as we possible can. Having a more normal environment is a good thing.
Comment #7
alexpottActually looking at install_drupal() there's a really good place to put an unset.
Comment #8
alexpottA comment would be nice.
Comment #9
dawehnerNice!
I wish we would have a different mechanism for that than setting globals, ¯\_(ツ)_/¯
I'm a bit confused, what is special about kernel tests?
Comment #10
alexpottKernelTests are special because never call install_drupal(). So they're not really part of the problem. Kernel tests have the profile set to an empty string. In 8.5.x they couldn't install real modules that were part of profiles. With the new extension listing they can - which is a cool, unintended I guess, side-effect.
Comment #11
alexpottSmall typo.
Comment #12
alexpottComment #14
dawehnerThank you @alexpott for the explanation!
Comment #17
catchCommitted/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!
Comment #19
catch*Cough* clue's in the title.