Problem/Motivation

PHPStan released version 1.10.24 (See https://github.com/phpstan/phpstan/releases/tag/1.10.24).

After numerous worry-free updates this one uncoveres previously unspotted Level 1 issues.

NOTE: Updating mglaman/phpstan-drupal is necessary, because without that we get 14 errors on 10.1.x and 17 on 11.x.
See here and here.

Steps to reproduce

See https://www.drupal.org/node/3060/qa and notice the failures on updated deps jobs for 11.x.

Proposed resolution

- Upgrade phpstan/phpstan to 1.10.24
- Upgrade mglaman/phpstan-drupal to 1.1.36
- Create a new baseline
- Bump versions of phpstan/phpstan and mglaman/phpstan-drupal in composer.* to latest, since the newly created baseline won't pass on any lower version.

Sadly the two newly discovered errors are for #3352916: Fix PHPStan L1 errors "Call to method getDefinitions()/getSortedDefinitions() on an unknown class Drupal\Core\Plugin\CategorizingPluginManagerTrait.", which is postponed on other issues and, most importantly a change/update/something on our deprecation policy (#3354524: Document how to add additional parameters to interface methods), so for now, we can't fix it immediately.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#3 3372757-10.1.x-3.patch5.8 KBspokje
#2 3372757-11.x-2.patch6.97 KBspokje

Comments

Spokje created an issue. See original summary.

spokje’s picture

StatusFileSize
new6.97 KB
spokje’s picture

StatusFileSize
new5.8 KB
spokje’s picture

I've added a 10.1.x-patch out of habit, but seeing that there are no errors before and after the version-bump, we could easily only do the 11.x bump-boogie.

spokje’s picture

Status: Active » Needs review
borisson_’s picture

Status: Needs review » Reviewed & tested by the community

The last submitted patch, 2: 3372757-11.x-2.patch, failed testing. View results

  • longwave committed 0a283530 on 11.x
    Issue #3372757: Bump phpstan/phpstan and mglaman/phpstan-drupal to...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 0a283530d7 to 11.x. Thanks!

Decided not to backport for now as we have released 10.1.0 and while these are only dev dependencies, if there is no reason to upgrade, let's stick with the versions we are currently pinned to.

  • longwave committed fc54da11 on 11.x
    Issue #3372757 by Spokje: Bump phpstan/phpstan and mglaman/phpstan-...

  • longwave committed 2096ffc6 on 11.x
    Revert "Issue #3372757: Bump phpstan/phpstan and mglaman/phpstan-drupal...
longwave’s picture

Reverted and re-committed as I missed the credit from the original commit message.

Status: Fixed » Closed (fixed)

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