fix(ITCR-1271): widen module_installer typehint to ModuleInstallerInterface (D11.4)

Problem

On Drupal 11.4 install/update fails:

TypeError: ConfigImporterService::__construct():
Argument #8 ($module_installer) must be of type
Drupal\Core\ProxyClass\Extension\ModuleInstaller,
Drupal\Core\Extension\ModuleInstaller given

Drupal 11.4 no longer generates a ProxyClass for the module_installer service (Drupal\Core\ProxyClass\Extension\ModuleInstaller no longer exists), so the container injects the concrete Drupal\Core\Extension\ModuleInstaller. The hardcoded ProxyClass typehint rejects it.

Fix

Typehint Drupal\Core\Extension\ModuleInstallerInterface instead (import + @var + @param + constructor argument).

Compatibility

Both the concrete ModuleInstaller and the pre-11.4 ProxyClass implement ModuleInstallerInterface, so this is backward compatible with Drupal 11.3.

Verified: full small_y install completes on Drupal 11.4.0-rc2 with this change (alongside the matching upgrade_tool fix).

Merge request reports

Loading
Loading