Skip to content

Commit c99f2e0

Browse files
authored
Merge pull request #469 from goba/patch-1
Update rule messages to use full Drupal messages
2 parents 569725a + f7024c3 commit c99f2e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Rules/Drupal/EntityQuery/EntityQueryHasAccessCheckRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function processNode(Node $node, Scope $scope): array
4040

4141
return [
4242
RuleErrorBuilder::message(
43-
'Missing explicit access check on entity query.'
43+
'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.'
4444
)->tip('See https://www.drupal.org/node/3201242')->build(),
4545
];
4646
}

tests/src/Rules/EntityQueryHasAccessCheckRuleTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public function cases(): \Generator
3333
[__DIR__.'/../../fixtures/drupal/modules/phpstan_fixtures/src/EntityQueryWithoutAccessRule.php'],
3434
[
3535
[
36-
'Missing explicit access check on entity query.',
36+
'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.',
3737
11,
3838
'See https://www.drupal.org/node/3201242',
3939
],
4040
[
41-
'Missing explicit access check on entity query.',
41+
'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.',
4242
19,
4343
'See https://www.drupal.org/node/3201242',
4444
],
@@ -53,7 +53,7 @@ public function cases(): \Generator
5353
[__DIR__.'/data/bug-396a1.php'],
5454
[
5555
[
56-
'Missing explicit access check on entity query.',
56+
'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.',
5757
27,
5858
'See https://www.drupal.org/node/3201242',
5959
]

0 commit comments

Comments
 (0)