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
-
Issue fork upgrade_status-3499888
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
niharika.s commentedComment #4
timohuismanI've created a MR so we can see if the tests are still green.
Comment #5
niharika.s commentedComment #7
jurgenhaasI've updated the MR to also allow
phpstan/phpstan-deprecation-rulesversion 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.
Comment #8
kingdutchBased 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.
Comment #9
jurgenhaasI've rebased to the latest changes in the dev branch, let's see if the tests are passing now.
Comment #10
jurgenhaasBack to NR, the pipelines are all green now.
Comment #11
kingdutch🎉
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 :)
Comment #12
f1mishutka commentedNice and simple patch, thanks!
Please merge it because it is a sad show stopper for switching to Drupal 11.2
Comment #13
joelpittetThis caught me trying to upgrade to D11 and then got held back from Drupal 11.2. +1 for merge
Comment #14
f1mishutka commentedA 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!
Comment #17
gábor hojtsyThanks 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.
Comment #18
f1mishutka commentedThank you!
Comment #19
gábor hojtsyNone 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!