Problem/Motivation

The installer has a circular dependency on system module, it shouldn't have.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3428372

Command icon 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:

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs work

Added some hacks which at least show where the problems are:

1. SessionHandler should implement the lazy table creation pattern, then I think batch would work properly. We should do this as an interim step even if we eventually want a sandbox/databaseless mode - because we'll still need to switch to a real database and the real session handler needs to work without weird installer hacks at that point too.

2. 2005-era spaghetti calls to system_page_attachments() that's never been refactored properly #3428339: Remove calls to system_page_attachments()

3. The installer uses system_schema() tables to check if Drupal is already installed, that won't work if we have lazy creation. It'll need to check... something else.

4. Minimal install profile depends on system module but doesn't declare a dependency.

With this MR applied, I get the following behaviour - I can click through to profile selection, then after choosing minimal and submitting, I get redirected back to the installer (this is probably lack of working session storage). If I click through again, Drupal tries to install the minimal install profile but chokes on the lack of user module.

We can do #1, #2 and #3 as independent changes in their own issues, without completely reworking the installer, as long as we can find a suitable replacement for #3.

Not sure what #4 means but not sure how useful it is if we want to make install profiles into recipes, we might get there quicker than cleaning up the current installer.

phenaproxima’s picture

as long as we can find a suitable replacement for #3

How about "does the core.extension config object exist?"

catch’s picture

Yes core.extension config object could work!

catch’s picture

catch’s picture

Title: Stop installing system module before everything else » [PP-2] Stop installing system module before everything else

I have a feeling this will be achievable, or at least attemptable, once #3428565: Implement lazy database creation for sessions and #3428339: Remove calls to system_page_attachments() land, so explicitly postponing on those issues.

wim leers’s picture

Title: [PP-2] Stop installing system module before everything else » [PP-1] Stop installing system module before everything else

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

catch’s picture

From the list in #3.

Sessions table was done in #3428565: Implement lazy database creation for sessions

system_page_attachments() got factored out to systemPageAttachments() - it still attaches libraries from system module but there's not much in those now after two years, maybe we can drop it.

catch’s picture

Status: Needs work » Postponed
catch’s picture

Status: Postponed » Closed (outdated)

Finally!!!!!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.