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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3372757-10.1.x-3.patch | 5.8 KB | spokje |
| #2 | 3372757-11.x-2.patch | 6.97 KB | spokje |
Comments
Comment #2
spokjeComment #3
spokjeComment #4
spokjeI'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 the11.xbump-boogie.Comment #5
spokjeComment #6
borisson_Comment #9
longwaveCommitted 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.
Comment #12
longwaveReverted and re-committed as I missed the credit from the original commit message.