-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
Fixed denormalization of a constructor argument which is a collection of non-resources #2859
Fixed denormalization of a constructor argument which is a collection of non-resources #2859
Conversation
Mhhh shouldn't this case go through the |
The few lines before case is for resource collection. It checks for |
Yes, you're right. The |
features/serializer/deserialize_objects_using_constructor.feature
Outdated
Show resolved
Hide resolved
features/serializer/deserialize_objects_using_constructor.feature
Outdated
Show resolved
Hide resolved
@karser You need to to do the same for the corresponding class mapped as MongoDB Document: https://github.com/api-platform/core/blob/v2.4.4/tests/Fixtures/TestBundle/Document/DummyEntityWithConstructor.php |
@teohhanhui done. MongoDB documents reuse behat features, don't they? |
Hmm... Not sure why the same test for mongodb is still failing. I'll investigate. |
Yikes. Looks like we're expecting the same order for the JSON keys, which is nonsensical. |
… of non-resources
Not fully following and it's not evident what you changed. I added |
It's because you added the |
I see now, ugh! |
Just wondering, since the entities and documents must be 100% identical, wouldn't it make sense to use the same classes and move the orm and odm annotations to xml files? |
Thanks @karser! 🎉 🚀 |
Hi Folks!
After upgrading to 2.4.4 (from 2.4.2) I started getting an error.
The error wording is:
The property path constructor needs a string or an instance of \"Symfony\\Component\\PropertyAccess\\PropertyPath\". Got: \"integer\" in symfony/serializer/Normalizer/AbstractObjectNormalizer.php, line 302
.I fixed this bug by adding '[]' to the class of the collection argument at this line.