Problem/Motivation
Our dev dependency on phpstan is not up to date.
phpstan/phpstan 1.4.0 1.6.7 PHPStan - PHP Static Analysis Tool
Updating those provides us with the latest improvements.
For the phpstan updates this might give us performance improvements. (which might help with #3259355: Always do a full phpstan analysis on DrupalCI)
https://phpstan.org/blog/phpstan-1-6-0-with-conditional-return-types
Proposed resolution
Remaining tasks
Updating mglaman/phpstan-drupal was split of to #3279840: Update mglaman/phpstan-drupal
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3278916
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:
Comments
Comment #2
longwave#3278162: Update Composer dependencies to the latest minor and patch versions covers this and more.
Comment #4
mallezieThis also updates the baseline. Most are false positives being removed.
Most added new entry added is:
Not sure if we could just add those, or fix them before updating the dependencies.
Comment #5
mallezieThis is strange, I don't see that one when I ran phpstan locally.
Also when checking the codebase, the 2 mentioned missing accescheck calls are there (although false)
Comment #6
mondrake@mallezie @mglaman it could make sense to split the update in two, one for phpstan itself and one for phpstan-drupal...
Missing explicit access check on entity querysounds definitely like a phpstan-drupal error.Maybe the baseline changes of phpstan itself are more manageable.
Comment #7
xjmComment #8
longwaveNeeds reroll following #3278162: Update Composer dependencies to the latest minor and patch versions
Comment #9
mallezieRerolling, and only updating phpstan/phpstan in this issue.
phpstan-drupal can be updated in #3279840: Update mglaman/phpstan-drupal
This still includes changes from #3278782: PHPStan baseline is out of sync
Comment #10
mallezieComment #11
mallezieGoing through the baseline diff. Only thing i'm seeing is removals of items from the baseline. This means phpstan is fixing false positives.
Comment #12
mondrakeLook good to me, thanks!
Comment #13
alexpottCredited @mondrake for issue scoping.
Committed 810334c and pushed to 10.0.x. Thanks!
Comment #16
xjm