Deprecated Entity Query Access Check in workbench_moderation Module

Created on 24 August 2023, over 1 year ago

Problem/Motivation

The Workbench Moderation module currently relies on deprecated methods for checking access using entity queries. This practice will be deprecated in Drupal 9.2.0 and will result in an error starting from Drupal 10.0.0. The recommended approach is to use \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to explicitly specify whether access should be checked.

Details:
In the file modules/contrib/workbench_moderation/src/EntityTypeInfo.php at line 239 and in the file modules/contrib/workbench_moderation/src/Form/ModerationStateTransitionForm.php at line 100, the Workbench Moderation module relies on entity queries to check access. However, this approach is being deprecated in Drupal 9.2.0 and will lead to errors in Drupal 10.0.0.

Proposed resolution

To address this issue, the Workbench Moderation module should be updated to use the new recommended approach. Specifically, it should utilize \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with either TRUE or FALSE to clearly indicate whether access checks are required.

Proposed Patch:
I have added patch for that.

💬 Support request
Status

Needs review

Version

1.7

Component

Code

Created by

🇮🇳India mdeahmad Mumbai

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

Comments & Activities

Production build 0.71.5 2024