Open matteorebeschi opened 2 years ago
Great, thanks! Test looks good. Now that we have a test, if you like you can put your first fix in here. I've got some ideas on how to address it and improve the code you posted, if you don't mind me tweaking it.
I've tried changing the convertFieldsToType
to what I mentioned in the error thread, but the tests keep failing, so I'm not even sure that that's a good starting point anymore.
But feel free to go ahead and tweak it if you have any ideas!
Hey @matteorebeschi, I was able to look at this. I looked at your tests and I think you had the fixture set up incorrectly.
I reworked the fixture and added tests for both null
support and DateTime
. The tests still pass, so it can successfully version null
values and DateTime
s. It never serializes the data in the way the original issues shows.
So far I can't replicate the problem
testDateTimeSupport
or copy/paste it and recreate your scenario, that is, saving some datetime/null data and it failing to return from ->version()
? Type
for your datetimes?
This is the failing test for the datetime field as discussed in #47