Boegie
Boegie
An example of the reverse: (Source: https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php#L296-L298) ``` /** @var \Drupal\Core\Entity\TranslatableRevisionableStorageInterface|\Drupal\Core\Entity\EntityStorageInterface $storage */ $storage = $this->entityTypeManager->getStorage($this->entityTypeId); $next_id = $storage->getQuery()->accessCheck(FALSE)->count()->execute() + 1; ``` 1.1.16 reports ``` ------ ------------------------------------------------ Line FieldableEntityDefinitionUpdateTest.php ------...
Source https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php#L175-L183 ``` $query = $this->storage ->getQuery('OR') ->accessCheck(FALSE) ->exists($greetings, 'tr') ->condition("$figures.color", 'red') ->sort('id'); $count_query = clone $query; $this->assertEquals(12, $count_query->count()->execute()); ``` 1.1.16 reports: ``` ------ ------------------------------------------------ Line EntityQueryTest.php ------ ------------------------------------------------ 182...
Source: https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php#L175-442 ``` $query = $this->storage ->getQuery() ->accessCheck(FALSE) ->sort("$figures.color") ->sort("$greetings.format") ->sort('id'); [snipped-for-sanity] $count_query = clone $query; $this->assertEquals(15, $count_query->count()->execute()); ``` 1.1.16 reports: ``` ------ ------------------------------------------------ Line EntityQueryTest.php ------ ------------------------------------------------ 442 Missing...
Source: https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php#L464-L471 ``` $query = $this->storage ->getQuery() ->accessCheck(FALSE) ->sort("$figures.color", 'DESC') ->sort("$greetings.format", 'DESC') ->sort('id', 'DESC'); $count_query = clone $query; $this->assertEquals(15, $count_query->count()->execute()); ``` 1.1.16 reports: ``` ------ ------------------------------------------------ Line EntityQueryTest.php ------ ------------------------------------------------...
Source: https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php#L560-L566 ``` $count = $this->container->get('entity_type.manager') ->getStorage('entity_test') ->getQuery() ->accessCheck(FALSE) ->exists("$field_name.color") ->count() ->execute(); ``` 1.1.16 reports: ``` ------ ------------------------------------------------ Line EntityQueryTest.php ------ ------------------------------------------------ 560 Missing explicit access check on entity query....
Added a (very naive) first stab at updating the old PR in #106.
I can see benefit in this (for both Drupal and other projects). It would make it possible to "be ahead of the game" instead of making a big rush when...
Working on a PR as we speak/type/whatever.
`// @todo: Write @todo`...