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-drupal to 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

Comments

Spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
mondrake’s picture

I 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.

spokje’s picture

Yeah, 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.

spokje’s picture

StatusFileSize
new72.54 KB
spokje’s picture

Title: Fix outdated deprecation in phpstan-baseline.neon » Fix failing "updated deps" test-runs by upping mglaman/phpstan-drupal to latest
Issue summary: View changes
mondrake’s picture

❤️ the copyright thing in the issue summary 🤣

spokje’s picture

StatusFileSize
new76.67 KB

Right, playtime is over.

Here's a patch that bumps mglaman/phpstan-drupal to latest (including upping the version constraint in composer.json) AND refreshes the baseline at the same time.

spokje’s picture

StatusFileSize
new77.25 KB
new524 bytes
spokje’s picture

So 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

mondrake’s picture

Status: Active » Reviewed & tested by the community

#11 yes!

spokje’s picture

I think this whole "Active straight to RTBC" is going to be big in 2023!

spokje’s picture

Assigned: spokje » Unassigned

Removing my fingerprints...

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Our friend does not apply to 10.1.x. :( They have diverged because of Twig, among other things.

spokje’s picture

StatusFileSize
new77.25 KB
new77.23 KB

Rerolled #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)

spokje’s picture

StatusFileSize
new77.23 KB
xjm’s picture

Status: Needs work » Needs review
mondrake’s picture

Status: Needs review » Reviewed & tested by the community

Thanks. Do we have a diverging baseline between 10.0 and 10.1? There must have been some PHPStan issues committed to 10.1 only.

spokje’s picture

Do we have a diverging baseline between 10.0 and 10.1? There must have been some PHPStan committed to 10.1 only.

There'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.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed dd9b165 and pushed to 10.1.x. Thanks!
Committed f175081 and pushed to 10.0.x. Thanks!

  • alexpott committed dd9b1659 on 10.1.x
    Issue #3330305 by Spokje, mondrake: Fix failing "updated deps" test-runs...

  • alexpott committed f175081b on 10.0.x
    Issue #3330305 by Spokje, mondrake: Fix failing "updated deps" test-runs...

Status: Fixed » Closed (fixed)

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