D10 compatibility: 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.

Created on 20 May 2023, over 1 year ago
Updated 21 June 2023, over 1 year ago

Problem/Motivation

The similar as per https://www.drupal.org/project/config_pages/issues/3333888 πŸ› D10 compatibility: access checks must be explicitly specified on content entity queries Fixed
I checked module with Upgrade Status β†’ and got the following report

Config Pages,  8.x-2.14
Scanned on Sat, 05/20/2023 - 11:32

FILE: modules/contrib/config_pages/config_pages.tokens.inc

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually 27   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.
--------------------------------------------------------------------------------

FILE: modules/contrib/config_pages/src/ConfigPagesListBuilder.php

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually 173  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.
--------------------------------------------------------------------------------

Steps to reproduce

drush upgrade_status:analyze config_pages

Proposed resolution

Add ->accessCheck() the same way it was added in similar issue(s).

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine deimos

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

Comments & Activities

Production build 0.71.5 2024