Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psalm UndefinedDocblockClass for Expectable in functions.php #867

Closed
ndench opened this issue Jul 21, 2023 · 2 comments
Closed

Psalm UndefinedDocblockClass for Expectable in functions.php #867

ndench opened this issue Jul 21, 2023 · 2 comments

Comments

@ndench
Copy link

ndench commented Jul 21, 2023

After upgrading to 2.9.x we get psalm reporting a lot of UndefinedDockblockClass issues on our pest tests.
It appears to be caused by 4f3796e.

This has been raised in psalm a while back (vimeo/psalm#3695) and the response was

Traits are not types so you shouldn't use them as types.

Maybe we should define an ExpectableInterface and use that type instead?

@nunomaduro
Copy link
Member

That's an issue with psalm. Not Pest.

@kielabokkie
Copy link

@nunomaduro Would you reconsider this if PHPStan agrees with Psalm that Traits should not be used as types?

https://phpstan.org/writing-php-code/phpdoc-types#classes-and-interfaces

Screen Shot 2023-07-24 at 12 19 26 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants