From 2b7b891a53755fda0f89602a2b9fb5423b7b0299 Mon Sep 17 00:00:00 2001 From: Hirenkumar Parmar Date: Thu, 2 Feb 2023 18:25:49 +0530 Subject: [PATCH] Relying on entity queries to check access by default is deprecated --- src/UpdateService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UpdateService.php b/src/UpdateService.php index dff881e..7da5a48 100644 --- a/src/UpdateService.php +++ b/src/UpdateService.php @@ -249,7 +249,7 @@ public function update8804(&$sandbox) { $apidocStorage = $this->entityTypeManager->getStorage('apidoc'); if (!isset($sandbox['progress'])) { - $query = $apidocStorage->getQuery(); + $query = $apidocStorage->getQuery()->accessCheck(FALSE); $total = $query->count()->execute(); $sandbox['progress'] = 0; @@ -264,6 +264,7 @@ public function update8804(&$sandbox) { // Migrate in chunks of 20. $query = $apidocStorage->getQuery() + ->accessCheck(FALSE) ->sort('id') ->range($sandbox['progress'], 20); $ids = $query->execute();