Problem/Motivation
Now #2208429: Extension System, Part III: ExtensionList, ModuleExtensionList and ProfileExtensionList we can get rid of the ugly hack in drupal_install_system and install_begin_request():
$module_list->setPathname('system', 'core/modules/system/system.info.yml');
...
\Drupal::service('extension.list.module')->setPathname('system', 'core/modules/system/system.info.yml');
Proposed resolution
- Remove the explicit setPathname('system', 'core/modules/system/system.info.yml') calls from install_begin_request() and drupal_install_system().
- Keep installing system through the normal module installer flow.
- Remove the stale `@todo` in ExtensionList::reset() that points to this issue.
- Add regression coverage proving that a pathname added with ExtensionList::setPathname() survives ExtensionList::reset().
Remaining tasks
review/commit
User interface changes
no
API changes
no
Data model changes
no
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 2934063-17.patch | 1.94 KB | alexpott |
| #15 | 2719315-15.patch | 841 bytes | alexpott |
Issue fork drupal-2719315
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 2719315-try-to-install
changes, plain diff MR !14809
Comments
Comment #8
rosk0Come across this one when debugging #2766509: Gracefully handle a non-existent cache service like cache.backend.memcache.
Lets ask testbot is it works.
Comment #9
rosk0Lots of tests failed...
Comment #10
amit.drupal commentedUpdate path #8 I hope its working.
Comment #11
amit.drupal commentedComment #15
alexpottComment #16
daffie commentedIn the Drupal code base there is another reference to this issue in the method Drupal\Core\Extension\ExtensionList::reset(). That @todo should also be fixed/removed.
Comment #17
alexpottI think that's really more to do with #2934063: Remove the workaround in \Drupal\Core\Installer\ExtensionListTrait::setPathname().
Let's try to do what it wants to do here - but I'm not really sure it is that wise.
Comment #26
andypostComment #28
andypostWith sequences table removal last patch pass so it depends on it #3335756: Drop sequences table in Drupal 12
Comment #29
catch#3335756: Drop sequences table in Drupal 12 is in!!
Comment #30
andypostRebased but CI looks overloaded
Comment #31
andypostI bet it ready to go with #2934063: Remove the workaround in \Drupal\Core\Installer\ExtensionListTrait::setPathname()
Comment #32
andypostif this one will go first
install_begin_request()needs to remove$module_listvariableComment #33
smustgrave commentedSorry can we update the IS to help the reviews.
Comment #34
andypostUpdated, generally it's about to remove TODOs
Comment #35
smustgrave commentedOh it's that simple lol thanks!
Everything looks fine to me. Only code being added is a test and that passes
Comment #36
alexpottFWIW system is still not being installed like another module. We're still prepopulating the system path in the extension list. It's just that the calls being removed here are currently pointless. See \Drupal\Core\Installer\InstallerKernel::getExtensions() for where this starts. This happened as part of #3481778: Deprecate functions using ModuleHandler::add() :D - basically the priming of the system module in the installer has moved to an earlier place.
I think this issue should be re-titled to reflect this and the issue summary needs an update. Once that is done we can go back to rtbc.
Comment #37
longwaveRetitled, I don't think the IS actually needed much work, just neatened it up a little.
Comment #38
andypostThere's follow-up to clean-up and deprecate more #2934063: Remove the workaround in \Drupal\Core\Installer\ExtensionListTrait::setPathname()
This issue makes system module discoverable without manual setPathname()
@alexpott the
\Drupal\Core\Installer\InstallerKernel::getExtensions()is how system module and "claro" are installled - that's how core enables them, not sure we need to do something about it but after fixing it andExtensionListTraitwe can merge providers in #3574200: [PP-2] Get rid of 2-phase kernel boot in installerComment #40
catchCommitted/pushed to main and 11.x, thanks!