-
-
Notifications
You must be signed in to change notification settings - Fork 75
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 errors with Attributes phpstan-type declaration #701
Comments
Hello, would you mind to test this PR please? <plugins>
<pluginClass class="Zenstruck\Foundry\Psalm\FoundryPlugin"/>
</plugins> I've removed all those By the way, I think we're abusing PHPStan's pseudo types, and everywhere we're using them, I think we should prefix the annotation with |
I'm sorry I missed the notification of your comment and I have not been of any help. I've just seen the package upgrade to 2.2.0 on my machine after a composer update and no psalm errors appeared. (I had not used your Plugin yet) Then I tried with and without the plugin and both case gave me no error, I'm not sure what the plugin does and I won't use it till I'm sure I need it. Thanks for the fix. |
thanks for your answer! do you have that bunch of ugly annotations above your factories? without them and without the plugin, I cannot manage to get a simple psalm analysis right |
Hi !
I should have opened this issue a month ago (sorry about that) since I commented here thinking it was related.
As mentionned in the linked comment, since
2.0.8
I started getting these kind of Psalm errors:From what I understand: Psalm doesn't seem to appreciate the fact that I pass an array instead of an instance of a non existing class Attributes to my factories like this:
After some investigations it seems that these "errors" have been introduced by this commit
and particularly by these added lines in the PersistentProxyObjectFactory
if I remove
@method
annotations, everything gets back to normal on my end, I'm trying to understand what's happening and my best guess is that @method annotations should not use phpstan aliases like Attributes.Hope I was clear enough. If you need me to provide more information, just ask, I'd be happy to do so.
The text was updated successfully, but these errors were encountered: