Problem/Motivation

GroupRelationshipTypeStorage::__construct() type-hints the $state parameter as Drupal\Core\State\State (concrete class) instead of Drupal\Core\State\StateInterface.

This breaks compatibility with any module that decorates the state service, which is a standard Drupal practice.

Steps to reproduce

1. Create a module that decorates the state service:

  # mymodule.services.yml
  services:
    mymodule.state_decorator:
      class: Drupal\mymodule\StateDecorator
      decorates: state
      arguments:
        - '@mymodule.state_decorator.inner'

  // src/StateDecorator.php
  class StateDecorator implements StateInterface {
    // ... decorator implementation
  }

2. Enable the group module (or any module depending on it)
3. Error occurs: TypeError: Drupal\group\Entity\Storage\GroupRelationshipTypeStorage::__construct(): Argument #7 ($state) must be of type Drupal\Core\State\State, Drupal\mymodule\StateDecorator given

Comments

rajeevk created an issue.