Problem/Motivation

Bump PHPStan to 2.1.17

Proposed resolution

composer update mglaman/phpstan-drupal phpstan/extension-installer phpstan/phpstan phpstan/phpstan-deprecation-rules phpstan/phpstan-phpunit

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3526142

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

mondrake created an issue. See original summary.

mondrake’s picture

Issue summary: View changes

mondrake’s picture

Status: Active » Postponed
Related issues: +#3525031: [CI] Run PHPStan job on PHP 8.4
mondrake’s picture

Status: Postponed » Active

#3525031: [CI] Run PHPStan job on PHP 8.4 is taking longer, let's try do this for 11.2

mondrake’s picture

Status: Active » Needs review

I think it's about time to drop support for PHPStan 1... in any case the baseline would differ significantly.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems like a straight forward update that didn't break anything. LGTM

mondrake’s picture

-

xjm’s picture

Status: Reviewed & tested by the community » Postponed

This will conflict with #3527142: Update Composer and development dependencies for 11.2.0 and 10.5.0 and Composer is more critical from a security perspective, so we're going to work on that one first.

xjm’s picture

Status: Postponed » Needs work
xjm’s picture

#3529504: Fix phpstan errors in UpdatePathTestTrait just went in and took a nice big chunk out of the baseline, so that will want regenerating here alongside the composer.lock and whatnot.

mondrake’s picture

Assigned: Unassigned » mondrake

on it

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Reviewed & tested by the community

done

  • catch committed 1068d9ce on 11.2.x
    Issue #3526142 by mondrake, xjm: Update PHPStan to 2.1.17
    
    (cherry...

  • catch committed c4a04a93 on 11.x
    Issue #3526142 by mondrake, xjm: Update PHPStan to 2.1.17
    
catch’s picture

Version: 11.x-dev » 11.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 11.2.x, thanks!

xjm’s picture

 

xjm’s picture

Issue tags: +11.2.0 release notes

 

xjm credited cmlara.

xjm’s picture

So everyone (including me) was in a bit of a rush to get this in because of the late RC, but in the process we overloooked the disruptiveness of this:

-        "mglaman/phpstan-drupal": "^1.2.11 || ^2.0.4",
+        "mglaman/phpstan-drupal": "^2.0.7",
-        "phpstan/phpstan": "^1.12.4 || ^2.1.14",
-        "phpstan/phpstan-phpunit": "^1.3.16 || ^2.0.6",
+        "phpstan/phpstan": "^2.1.17",
+        "phpstan/phpstan-phpunit": "^2.0.6",

That's removing the backwards-compatibility that was added in #3486713: Bump PHPStan to version 2.0.4. As @cmlara identified, 237 contributed projects use PHPStan ^1, so it's unfortunately not a small disruption, especially in a week-late RC for something that should have been in before beta.

For now, I've added a reference to PHPStan's upgrade guide to the release note, but we should keep an eye on this and see if there's anything we need to do to mitigate the situation for contrib in a patch release or hotfix.

Status: Fixed » Closed (fixed)

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