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
fix: PHPDoc @template and @return in database #7436
Conversation
8e34b8a
to
f6f5508
Compare
system/Database/ResultInterface.php
Outdated
/** | ||
* @template TConnection of object|resource | ||
* @template TResult of object|resource | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed TConnection
and TResult
because they are not used in this interface.
@paulbalandan Are you okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I added those template types to help phpstan think that the interface is a generic and thus implementing classes should specify the specific types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored @template
without types, because of vimeo/psalm#2625
It seems Psalm does not allow to use `resource` in @template type. See - codeigniter4/settings#60 (comment) - codeigniter4/shield#195 (comment)
f6f5508
to
a7a2369
Compare
a7a2369
to
377ef3d
Compare
Description
To fix this error: codeigniter4/shield#195 (comment)
It seems Psalm does not allow to use
resource
in @template type.See
COMPOSER_TOKEN
withGITHUB_TOKEN
settings#60 (comment)Checklist: