-
-
Notifications
You must be signed in to change notification settings - Fork 513
Support nullable date field in HydratorFactory #2753 #2755
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
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.
Hello @frenchcomp, thanks for contributing this fix.
Apparently it's breaking an existing test case. Also, the feature needs to be covered by a new non-regression test.
1) Doctrine\ODM\MongoDB\Tests\Functional\DateTest::testDateInstanceValueChangeDoesCauseUpdateIfValueIsTheSame
Failed asserting that an array is not empty.
/home/runner/work/mongodb-odm/mongodb-odm/tests/Doctrine/ODM/MongoDB/Tests/Functional/DateTest.php:102
edd531d
to
3bffd5c
Compare
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.
LGTM after the 2 CS fixes.
Merci Richard! |
De rien, désolé pour les A/R |
Update code generated by the HydratorFactory for date to support nullable datetime field.
Summary
These PR update only the HydratorFactory class to update the if condition to support nullable field like for other type.
It will update also the clone $return value, because $return can be 'null' and we can not clone null value in PHP.