Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getAggregateQuery() entity query access check false report #474

Closed
mstenta opened this issue Sep 12, 2022 · 1 comment · Fixed by #498
Closed

getAggregateQuery() entity query access check false report #474

mstenta opened this issue Sep 12, 2022 · 1 comment · Fixed by #498

Comments

@mstenta
Copy link

mstenta commented Sep 12, 2022

Probably a follow-up to the improvements that were made in #454...

The following code is resulting in PHPStan error: "Missing explicit access check on entity query."

$query = $this->entityTypeManager->getStorage($entity_type)->getAggregateQuery()
  ->accessCheck(TRUE)
  ->condition('type', $bundle);

Perhaps we just need to accommodate getAggregateQuery()? Or is there a "correct" way to structure the code to make PHPStan happy? :-)

mstenta added a commit to mstenta/farmOS that referenced this issue Sep 12, 2022
…ssing explicit access check on entity query" errors.

This is a temporary workaround pending resolution of this upstream issue:

mglaman/phpstan-drupal#474
mstenta added a commit to mstenta/farmOS that referenced this issue Sep 12, 2022
…ssing explicit access check on entity query" errors.

This is a temporary workaround pending resolution of this upstream issue:

mglaman/phpstan-drupal#474
mstenta added a commit to mstenta/farmOS that referenced this issue Sep 12, 2022
…ssing explicit access check on entity query" errors.

This is a temporary workaround pending resolution of this upstream issue:

mglaman/phpstan-drupal#474
mstenta added a commit to mstenta/farmOS that referenced this issue Sep 13, 2022
…ssing explicit access check on entity query" errors.

This is a temporary workaround pending resolution of this upstream issue:

mglaman/phpstan-drupal#474
mstenta added a commit to mstenta/farmOS that referenced this issue Sep 13, 2022
…ssing explicit access check on entity query" errors.

This is a temporary workaround pending resolution of this upstream issue:

mglaman/phpstan-drupal#474
@Boegie Boegie mentioned this issue Jan 5, 2023
Merged
@Boegie
Copy link
Contributor

Boegie commented Jan 5, 2023

Added a PR to try and fix getAggregateQuery() problems.

mglaman added a commit that referenced this issue Jan 25, 2023
mstenta pushed a commit to farmOS/farmOS that referenced this issue Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants