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 */
Issue fork domain_theme_switch-3584274
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
Comment #3
mably commentedComment #5
mably commented