Problem

In domain_theme_switch.install, the service domain_config_ui.manager is used without a @var type hint. PHPStan resolves it to the concrete class DomainConfigUIManager via the Drupal extension. When the domain module marks this class as @internal (see #3584261), PHPStan flags the addConfigurationsToDomain() call.

The method is defined on DomainConfigUIManagerInterface, so the fix is to add a @var type hint with the interface type.

Fix

Add a @var annotation in domain_theme_switch.install:

/** @var \Drupal\domain_config_ui\DomainConfigUIManagerInterface $domain_config_ui_manager */

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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed f1ca9c8a on 3.x
    task: #3584274 Use interface type hints for domain services in install...
mably’s picture

Status: Needs review » Fixed

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.