Problem/Motivation

The 2.0 version of phpstan/phpstan was released in november 2024. The drupal/upgrade_status project has a indirect dependency on it through mglaman/phpstan-drupal. The 2.0 version of mglaman/phpstan-drupal does offer support for the latest phpstan version.

Steps to reproduce

Proposed resolution

Allow both versions of mglaman/phpstan-drupal for a easy transition.

"require": {
  "mglaman/phpstan-drupal": "^1.2.11|^2.0",
  ...
},

Remaining tasks

  • ✅ Widen the dependency version constraints
  • Verify it still works

User interface changes

-

API changes

-

Data model changes

-

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:

Comments

timohuisman created an issue. See original summary.

niharika.s’s picture

Assigned: Unassigned » niharika.s

timohuisman’s picture

Issue summary: View changes
Status: Active » Needs review

I've created a MR so we can see if the tests are still green.

niharika.s’s picture

Assigned: niharika.s » Unassigned

jurgenhaas made their first commit to this issue’s fork.

jurgenhaas’s picture

I've updated the MR to also allow phpstan/phpstan-deprecation-rules version 2 because otherwise, we would still get PhpStan version 1.

I've tested the MR locally and it now works by pulling the latest PhpStan version and also the latest mglaman/phpstan-drupal

Leaving the status at NR as I've changed the MR, so I can't move it to RTBC.

kingdutch’s picture

Status: Needs review » Needs work

Based on the code changes I'd be happy to RTBC this, but the tests are failing so I think this needs some work to figure out why that is.

jurgenhaas’s picture

I've rebased to the latest changes in the dev branch, let's see if the tests are passing now.

jurgenhaas’s picture

Status: Needs work » Needs review

Back to NR, the pipelines are all green now.

kingdutch’s picture

Status: Needs review » Reviewed & tested by the community

🎉

Looks good to me, ensures that Upgrade Status can be installed for projects that got ahead of it with PHPStan and looks to work as expected :)

f1mishutka’s picture

Nice and simple patch, thanks!

Please merge it because it is a sad show stopper for switching to Drupal 11.2

joelpittet’s picture

This caught me trying to upgrade to D11 and then got held back from Drupal 11.2. +1 for merge

f1mishutka’s picture

A kind of funny situation: Module supposed to be first and must-have helper for Drupal upgrades is a show stopper for Drupal 11.2 update.

Please merge this as soon as possible... Thanks!

gábor hojtsy made their first commit to this issue’s fork.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all! I get the irony! :) Hope this helps. Will do a release too later today, but will check first if there are other low hanging fruits to include too.

f1mishutka’s picture

Thank you!

gábor hojtsy’s picture

None of the fruits seemed low enough so released this with one other commit I already had :D https://www.drupal.org/project/upgrade_status/releases/4.3.8 Thanks again!

Status: Fixed » Closed (fixed)

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