Problem/Motivation

Drupal 10 compatibility report has found the following issue:

Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked.

Proposed resolution

Add explicit access checks in the following places:

  • config_entity_example/src/Form/RobotFormBase.php (line 136)
  • pager_example/src/Controller/PagerExamplePage.php (line 99)

Remaining tasks

- Create a patch
- Rerun compatibility report

Issue fork examples-3340865

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

valthebald created an issue. See original summary.

smustgrave’s picture

Assigned: Unassigned » smustgrave

Going to work on this tomorrow.

smustgrave’s picture

Assigned: smustgrave » Unassigned
Status: Active » Needs review

Using upgrade_status addressed the 2 instances of this.

  • jungle committed 09b1f8d2 on 3.x
    Issue #3340865 by smustgrave: Add explicit entity query checks
    
jungle’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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