GroupLatestRevisionCheck missing use for ModerationInformationInterface

Created on 2 July 2025, about 1 month ago

Steps to reproduce

When trying migrate from 1.6 to latest 2.3.2 I found this error running the database updates:

 // Do you wish to run the specified pending updates?: yes.

>  [notice] Update started: group_update_9200
>  [error]  Drupal\group\Entity\Access\GroupLatestRevisionCheck::setContentModerationInfo(): Argument #1 ($moderation_information) must be of type Drupal\group\Entity\Access\ModerationInformationInterface, Drupal\content_moderation\ModerationInformation given, called in /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1675
>  [error]  Update failed: group_update_9200
>  [notice] Update started: gnode_update_8007
>  [notice] Update completed: gnode_update_8007
 [error]  Update aborted by: group_update_9200
 [error]  Finished performing updates.
 [error]  TypeError: Drupal\group\Entity\Access\GroupLatestRevisionCheck::setContentModerationInfo(): Argument #1 ($moderation_information) must be of type Drupal\group\Entity\Access\ModerationInformationInterface, Drupal\content_moderation\ModerationInformation given, called in /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1675 in Drupal\group\Entity\Access\GroupLatestRevisionCheck->setContentModerationInfo() (line 49 of /var/www/html/docroot/modules/contrib/group/src/Entity/Access/GroupLatestRevisionCheck.php) #0 /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php(1675): Drupal\group\Entity\Access\GroupLatestRevisionCheck->setContentModerationInfo()

Proposed resolution

Update use/import variables to remove unused:
Drupal\Core\Entity\RevisionableStorageInterface
And add missing:
use Drupal\content_moderation\ModerationInformationInterface

🐛 Bug report
Status

Active

Version

2.3

Component

Code

Created by

🇧🇷Brazil aluzzardi Pelotas, RS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024