Problem/Motivation

With the version bump of mglaman/phpstan-drupal in #3357114: Update mglaman/phpstan-drupal and help make daily "updated deps" QA jobs pass there are two more PHPStan L1 errors "Relying on entity queries to check access by default is deprecated..." which can be solved.
Both of them are in the Layout Builder module.

As it turns out there is still a problem with mglaman/phpstan-drupal relating to accesCheck() and count queries, see https://github.com/mglaman/phpstan-drupal/issues/545.
Therefore there will still be two occurrences of the above error present in the baseline. These should all be about count queries.
These should be solved when the above mentioned mglaman/phpstan-drupal is solved, committed and the new version of mglaman/phpstan-drupal is used by Drupal Core.
These two occurences are not a part of this issue.

Steps to reproduce

Proposed resolution

- There should be no more of the above mentioned errors in the Layout Builder module being suppressed in the baseline.
- TestBot should return green.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3357646

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Spokje created an issue. See original summary.

Spokje’s picture

Status: Active » Needs review
mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, the docblock helps PHPStan to identify the class of the object.

  • catch committed 63e76048 on 10.1.x
    Issue #3357646 by Spokje: Fix 2 PHPStan L1 errors "Relying on entity...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 63e7604 and pushed to 10.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.