drupal-check icon indicating copy to clipboard operation
drupal-check copied to clipboard

update to phpstan 2.0

Open ptmkenny opened this issue 1 year ago • 4 comments

Fixes https://github.com/mglaman/drupal-check/issues/318

Bumps the minimum PHP to 8.1 because that is what PHPStan 2 requires.

ptmkenny avatar Dec 12 '24 04:12 ptmkenny

The problem with these test failures is that the new CircleCI images (since 2021) use ubuntu, not debian, so some of the scripts break.

So I tried to use the "legacy" images to stay with debian, but the last version of PHP supported is 8.0 (https://hub.docker.com/r/circleci/php/tags?ordering=last_updated&name=8.&page=35), there is no 8.1 image. And PHP 8.1 is required for PHPStan 2.0. So I guess all the CI stuff has to be reworked for ubuntu now.

ptmkenny avatar Dec 12 '24 05:12 ptmkenny

Won't this break as it conflicts with drupal/core-dev? So we should allow ^1 || ^2?

Work to update drupal/core-dev is here: https://www.drupal.org/project/drupal/issues/3486713

It makes sense to postpone this until core makes a decision on whether it will jump to phpstan 2 or allow 1 and 2.

ptmkenny avatar Dec 12 '24 22:12 ptmkenny

10.x, 11.0.x, and 11.1.x will at least support it. Although I don't think there's actually any fixes this project could get. But that's ~2 years until PHPStan 1.x isn't used

mglaman avatar Dec 12 '24 22:12 mglaman

Drupal Rector just got a Rector 2/PHPStan 2 release today. Core 11.2 has moved to PHPStan 2 but allows PHPStan 1 to be installed. So it'd be great to get update drupal-check as well, and then there'll be phpstan 2 support throughout the Drupal tooling.

ptmkenny avatar May 24 '25 14:05 ptmkenny