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
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:
- 3357646-fix-2-phpstan changes, plain diff MR !3909
Comments
Comment #3
SpokjeComment #4
mondrakeThanks, the docblock helps PHPStan to identify the class of the object.
Comment #6
catchCommitted 63e7604 and pushed to 10.1.x. Thanks!