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
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:
- 3526142-update-phpstan-to
changes, plain diff MR !12206
Comments
Comment #2
mondrakeComment #4
mondrakeLet's do #3525031: [CI] Run PHPStan job on PHP 8.4 first.
Comment #5
mondrake#3525031: [CI] Run PHPStan job on PHP 8.4 is taking longer, let's try do this for 11.2
Comment #6
mondrakeI think it's about time to drop support for PHPStan 1... in any case the baseline would differ significantly.
Comment #7
smustgrave commentedSeems like a straight forward update that didn't break anything. LGTM
Comment #8
mondrake-
Comment #9
xjmThis 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.
Comment #10
xjm#3527142: Update Composer and development dependencies for 11.2.0 and 10.5.0 is in now, so this can be rerolled.
Comment #11
xjm#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.lockand whatnot.Comment #12
mondrakeon it
Comment #13
mondrakedone
Comment #16
catchCommitted/pushed to 11.x and cherry-picked to 11.2.x, thanks!
Comment #18
xjmComment #19
xjmComment #21
xjmSo 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:
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.