Problem/Motivation
With the 1.1.26 release of mglaman/phpstan-drupal, we see our "updated deps" test-runs fail on both 10.0.x and 10.1.x
----- Original Problem/Motivation -----
We upped the removal-drupal-version from 10.0.0 to 11.0.0 for the deprecated constant REQUEST_TIME in #3318985: Bump REQUEST_TIME deprecation to Drupal 11.
Our core/phpstan-baseline.neon still suppresses based on 10.0.0. No problem.
Until a combo of the newest phpstan/* and/or mglaman/phpstan-drupal-packages decided around Dec. 23 that they had enough.
Our "updated deps" testruns on 10.0.x and 10.1.x starting failing with a flood of unmatched error patterns.
Steps to reproduce
https://www.drupal.org/node/3060/qa
Proposed resolution
Make changes to the baseline and let the "updated" deps test-runs pass again, whilst at the same time keep the ""non"-updated deps" test-runs pass.
I think here we can only bump
mglaman/phpstan-drupalto latest (including upping the version constraint in composer.json) AND refresh the baseline at the same time.
(c) @mondrake
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 3330305-10.0.x-17.patch | 77.23 KB | spokje |
| #16 | 3330305-10.1.x-16.patch | 77.23 KB | spokje |
Comments
Comment #2
spokjeComment #3
spokjeComment #4
mondrakeI think here we can only bump mglaman/phpstan-drupal to latest (including upping the version constraint in composer.json) AND refresh the baseline at the same time.
Comment #5
spokjeYeah, I think @mondrake is right (per usual), but I want to have one go with a baseline, recreated with the latest-and-greatest packages, and let the current packages give their verdict on it.
If that fails: Do what @mondrake said.
Comment #6
spokjeComment #7
spokjeComment #8
mondrake❤️ the copyright thing in the issue summary 🤣
Comment #9
spokjeRight, playtime is over.
Here's a patch that bumps
mglaman/phpstan-drupalto latest (including upping the version constraint in composer.json) AND refreshes the baseline at the same time.Comment #10
spokjeComment #11
spokjeSo it looks like if we go this route, we can close #3280328: Stop ignoring "Missing explicit access check on entity query." rule in core/phpstan-baseline.neon as outdated, the (very) few remaining Entity Query-related errors in the baseline all seem legit and the suppression is completely removed
Comment #12
mondrake#11 yes!
Comment #13
spokjeI think this whole "Active straight to RTBC" is going to be big in 2023!
Comment #14
spokjeRemoving my fingerprints...
Comment #15
xjmOur friend does not apply to 10.1.x. :( They have diverged because of Twig, among other things.
Comment #16
spokjeRerolled #10 for 10.0.x and 10.1.x.
No interdiff since reroll and diffs of composer.locks are soooo 2022 (and not really useful)
Comment #17
spokjeComment #18
xjmComment #19
mondrakeThanks. Do we have a diverging baseline between 10.0 and 10.1? There must have been some PHPStan issues committed to 10.1 only.
Comment #20
spokjeThere's (at least) #3326371: [10.0.x backport] Fix PHPStan L1 error "Anonymous function has an unused use $foo." that went in 10.1.x only.
Comment #21
alexpottCommitted dd9b165 and pushed to 10.1.x. Thanks!
Committed f175081 and pushed to 10.0.x. Thanks!