Update alias manager type hint to use AliasManagerInterface in MultipleRegistrationController

Fix TypeError when Workspaces module is enabled

With Workspaces enabled, the site throws:

Argument #3 ($aliasManager) must be of type Drupal\path_alias\AliasManager, Drupal\workspaces\WorkspacesAliasManager given

Workspaces decorates path_alias.manager, so the injected service is WorkspacesAliasManager (implements the interface) rather than the concrete AliasManager class. The controller was type-hinting the concrete class, which caused the error.

Change: In MultipleRegistrationController.php, type-hint AliasManagerInterface instead of AliasManager in the use statement, @param, and constructor. The controller only calls getAliasByPath(), which is on the interface, so behaviour is unchanged. Service id stays path_alias.manager.

Closes #3579036

Merge request reports

Loading