Problem/Motivation

Amongst the "new" errors found when running PHPStan on level 2 is: PHPDoc tag @throws with type Foo is not subtype of Throwable

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

CommentFileSizeAuthor
#3 level2_POST-3324838.txt2.18 MBspokje
#3 level2_PRE.txt2.18 MBspokje

Issue fork drupal-3324838

Command icon 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:

Comments

Spokje created an issue. See original summary.

spokje’s picture

StatusFileSize
new2.18 MB
new2.18 MB

Attached out of vendor/bin/phpstan analyze --configuration=core/phpstan.neon.dist --xdebug --no-ansi with lvl 2 before and after applying the MR.

spokje’s picture

Status: Active » Needs review
mallezie’s picture

Status: Needs review » Reviewed & tested by the community

This looks good. Only PHPDoc changes, and fixes some baseline L2 issues.

Rajeshreeputra made their first commit to this issue’s fork.

xjm’s picture

Removing credit for unneeded merge or rebase.

  • xjm committed 97ffc69f on 10.1.x
    Issue #3324838 by Spokje: Fix PHPStan L2 error "PHPDoc tag @throws with...

  • xjm committed ae3bd364 on 10.0.x
    Issue #3324838 by Spokje: Fix PHPStan L2 error "PHPDoc tag @throws with...

  • xjm committed f385639b on 9.5.x
    Issue #3324838 by Spokje: Fix PHPStan L2 error "PHPDoc tag @throws with...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Nice little cleanup. I reviewed it locally with git diff --color-words and confirmed that it's mostly adding leading slashes or missing namespaces, or in one case correcting a typo.

Committed to 10.1.x, and cherry-picked to 10.0.x and 9.5.x as a phpdoc improvement. Thanks!

Status: Fixed » Closed (fixed)

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