module_load_install() removed in Drupal 10

Created on 4 December 2023, 12 months ago
Updated 8 December 2023, 12 months ago

Problem/Motivation

module_load_install() has been removed from Drupal 10.

Proposed resolution

In tests/src/Kermel/RequirementsTest.php replace:

module_load_install('sqlsrv');

with

\Drupal::moduleHandler()->loadInclude('sqlsrv', 'install');
πŸ› Bug report
Status

Needs review

Version

4.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States KenKodz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @KenKodz
  • Merge request !88Issue #3405975 by KenKodz β†’ (Open) created by KenKodz
  • Assigned to KenKodz
  • Status changed to Needs review 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States KenKodz
  • πŸ‡ΊπŸ‡ΈUnited States KenKodz

    My merge request may not be needed. It may just need that line removed. It appears that the next line in the code is effectively the same thing, but I haven't tested it.

  • πŸ‡¬πŸ‡§United Kingdom pstewart

    Hah, I should've checked the issue list before releasing rc1 shouldn't I lol. As this issue just relates to the test suite this doesn't affect anything there though, so rc1 is still fine. You're right that \Drupal::moduleHandler() and \Drupal::service('module_handler') are doing exactly the same thing - they both get the module_handler from the container, so we only need one of them.

Production build 0.71.5 2024