-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Update getAssociationTargetClass phpdoc #8907
Conversation
@@ -3409,6 +3409,9 @@ public function getAssociationNames() | |||
/** | |||
* {@inheritDoc} | |||
* | |||
* @return string | |||
* @psalm-return class-string | |||
* | |||
* @throws InvalidArgumentException | |||
*/ | |||
public function getAssociationTargetClass($assocName) |
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.
Not sure why Psalm suddenly requires $assocName
to be documented 🤔
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.
psalm has a "All or nothing" strategy. So indeed, since I add the return tag, I have to add the param too... edited.
Thanks @VincentLanglet ! I squashed and used a commit message explaining why you are doing this: b19a13f |
Thanks ! Don't know if this is worth enough for a release, in order to avoid consumer with phpstan/psalm to not having too deal with null values (since the persistence repository was released recently) |
The last release is quite old, so while by itself it's probably not worth it, I think we might want to release anyway. |
Now the interface can return null, doctrine/persistence#192, the phpdoc here should be precised because it never return null.