Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Amongst the "new" errors found when running PHPStan on level 2 is: PHPDoc tag @return with type Foo is incompatible with native type void.
This child-issue exists to fix all of those.
Steps to reproduce
- Run PHPStan on level 2 and see the above error amongst all others.
Proposed resolution
- Solve all of the the above mentioned reported errors.
- Run PHPStan on level 2 and don't see the above mentioned error any more.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | level2.txt | 2.23 MB | Spokje |
#2 | 3322763-2.patch | 1.63 KB | Spokje |
|
Comments
Comment #2
SpokjeThe attached level2.txt is the output of
vendor/bin/phpstan analyze --configuration=core/phpstan.neon.dist
after setting PHPStan to level 2.We're "down" from the original
[ERROR] Found 9440 errors
to[ERROR] Found 9445 errors
.Hmmm, seems like the 2 commits done on the 10.1.x-branch after #3322735: [meta] Fix as many PHPStan level 2 issues as possible before bumping the rule level was created introduced some new L2 errors...
Comment #3
mondrakeLooks like a no brainer, thanks @Spokje
Comment #4
alexpottBackported to 9.4.x as this apples there and is correct.
Committed and pushed 81b8c86909 to 10.1.x and 74781068ec to 10.0.x and df5520b51e to 9.5.x and 28fafec11c to 9.4.x. Thanks!