-
Notifications
You must be signed in to change notification settings - Fork 105
Add integration tests for ORM features #37
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
Conversation
33d9bc7
to
4aa9f95
Compare
The methods `EntityManagerInterface#getReference()` and `EntityManagerInterface#getPartialReference()` have nullable return. That's properly documented for `getReference()` but had to be fixed for `getPartialReference()`.
4aa9f95
to
2c64003
Compare
} | ||
|
||
return $type; | ||
return TypeCombinator::addNull(new ObjectType($argType->getValue())); |
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.
This fix may be valid for ORM, but it's invalid for MongoDB ODM: getReference
and getPartialReference
don't return null
in ODM. That said, it's best to further split this extension since both methods in question aren't part of the ObjectManager
interface.
LGTM 😊 |
Hi, this is fine, going to merge this, but integration tests should also inspect some negative cases - actually verify that the extension doesn't just return |
@ondrejmirtes I think that we missid what @alcaeus said? |
Yep, not even as much as a reply to the highlighted issue. @ondrejmirtes the change to th extension is invalid, as is the original assumption that the ObjectManager interface provides a getReference method. |
@ondrejmirtes there's also a small fix which I can move to another PR if needed.