Loading
fix(ITCR-1271): widen module_installer typehint to ModuleInstallerInterface (D11.4)
Problem
On Drupal 11.4 site install/update fails:
TypeError: Drupal\openy_upgrade_tool\ConfigUpdater::__construct():
Argument #8 ($module_installer) must be of type
Drupal\Core\ProxyClass\Extension\ModuleInstaller,
Drupal\Core\Extension\ModuleInstaller given
(src/ConfigUpdater.php:53)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.
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.