[D10] deprecated module in the contrib module admin_toolbar

Created on 27 November 2023, about 1 year ago
Updated 2 December 2023, about 1 year ago

Problem/Motivation

After another batch of "Upgrade Status" scans to a few projects, I found these small D10 compatibility issues that need to be addressed:

On Line 123 of web/modules/contrib/admin_toolbar/admin_toolbar_search/src/SearchLinks.php

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.

On Line 114 of web/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php

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

- Install the module "Upgrade Status" and scan the project admin_toolbar

Proposed resolution

There's already an issue for this: https://www.drupal.org/project/admin_toolbar/issues/3338408 📌 Resolve access check errors for D10 compatibility Needs review

And a patch: https://www.drupal.org/files/issues/2023-05-30/3338408-fix-access-check-...

As noted in the comment #10 in the issue page, you don't really need this patch to make the module work with D10, but I thought I should point this issue just in case.

I applied the patch and ran the scan again, and I don't see the warnings any more.

Before:

After:

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

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

Comments & Activities

Production build 0.71.5 2024