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

Issue fork drupal-2719315

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

dawehner created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

rosk0’s picture

Status: Active » Needs review
Related issues: +#2766509: Gracefully handle a non-existent cache service like cache.backend.memcache
StatusFileSize
new825 bytes

Come across this one when debugging #2766509: Gracefully handle a non-existent cache service like cache.backend.memcache.

Lets ask testbot is it works.

rosk0’s picture

Status: Needs review » Needs work

Lots of tests failed...

amit.drupal’s picture

StatusFileSize
new724 bytes

Update path #8 I hope its working.

amit.drupal’s picture

Status: Needs work » Needs review

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

alexpott’s picture

StatusFileSize
new841 bytes
daffie’s picture

Status: Needs review » Needs work

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

  public function reset() {
    $this->extensions = NULL;
    $this->cache->delete($this->getListCacheId());
    $this->extensionInfo = NULL;
    $this->cache->delete($this->getInfoCacheId());
    $this->pathNames = NULL;

    try {
      $this->state->delete($this->getPathnamesCacheId());
    }
    catch (DatabaseExceptionWrapper $e) {
      // Ignore exceptions caused by a non existing {key_value} table in the
      // early installer.
    }

    $this->cache->delete($this->getPathnamesCacheId());
    // @todo In the long run it would be great to add the reset, but the early
    //   installer fails due to that. https://www.drupal.org/node/2719315 could
    //   help to resolve with that.
    return $this;
  }
alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new1.94 KB

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

Status: Needs review » Needs work

The last submitted patch, 17: 2934063-17.patch, failed testing. View results

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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.

andypost made their first commit to this issue’s fork.

andypost’s picture

andypost’s picture

With sequences table removal last patch pass so it depends on it #3335756: Drop sequences table in Drupal 12

catch’s picture

andypost’s picture

Status: Needs work » Needs review

Rebased but CI looks overloaded

andypost’s picture

andypost’s picture

if this one will go first install_begin_request() needs to remove $module_list variable

smustgrave’s picture

Status: Needs review » Needs work

Sorry can we update the IS to help the reviews.

andypost’s picture

Issue summary: View changes
Status: Needs work » Needs review

Updated, generally it's about to remove TODOs

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Oh it's that simple lol thanks!

Everything looks fine to me. Only code being added is a test and that passes

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

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

longwave’s picture

Title: Try to install system module like any other module » Remove unnecessary system.module path setup in installer
Issue summary: View changes
Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs issue summary update

Retitled, I don't think the IS actually needed much work, just neatened it up a little.

andypost’s picture

There'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 and ExtensionListTrait we can merge providers in #3574200: [PP-2] Get rid of 2-phase kernel boot in installer

  • catch committed 13ae7283 on main
    task: #2719315 Remove unnecessary system.module path setup in installer...
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

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.

  • catch committed d0d2599b on 11.x
    task: #2719315 Remove unnecessary system.module path setup in installer...