Problem/Motivation
While working on upgrades to Drupal 10 Upgrade status provided these errors as needing to be resolved manually:
FILE: web/modules/contrib/recaptcha_v3/src/Form/ReCaptchaV3ActionDeleteForm.php
STATUS LINE MESSAGE
--------------------------------------------------------------------------------
Check manually 20 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
Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | recaptcha_v3-resolve_access_check-3352732-2.patch | 607 bytes | klimp |
Issue fork recaptcha_v3-3352732
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
Comment #2
klimpComment #3
dench0@klimp
thanks for the reporting but
accessCheckdoes not make any sense for the config entities.PS: here is one example from the Drupal core https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/fie...
Comment #5
hmdnawaz commented@dench0 your link does not have any example you mentioned.
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.
Created an MR and re-opening the issue.
Comment #7
dench0Sorry, it was already overwritten, here is a new link:
https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/modules/fie...
And pls read carefully the change record.