-
Notifications
You must be signed in to change notification settings - Fork 793
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
Allow serialize_null option for Serializer #971
Allow serialize_null option for Serializer #971
Conversation
@@ -583,6 +583,8 @@ protected function getSerializerNode() | |||
->prototype('scalar')->end() | |||
->end() | |||
->scalarNode('version')->end() | |||
->booleanNode('serialize_null') | |||
->defaultFalse() |
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.
Missing end()
method call.
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.
That was fast @stloyd, thanks!
It is fixed now.
fe86adf
to
2b1ee49
Compare
Please add test coverage for this change |
553e6ac
to
a299778
Compare
a299778
to
1c886d4
Compare
Hi @merk, I added the needed tests. I make sure that |
Hello, any news on this PR please? |
Allow serialize_null option for Serializer
Thanks. |
Thanks @XWB ! |
It is currently impossible to populate attributes with a
null
value with FOSElasticaBundle, due to to the default behavior of JMS Serializer which doesn't serialize attributes withnull
values.This PR adds an option to the
serializer
configuration so that the JMS Serializer can be configured with theserialize_null
option.There is no specific test for this PR, as it is a configuration for JMS Serializer, and I didn't find any other test concerning its configuration (for the
version
andgroups
options). I just updated the default test configuration (with afalse
value, which is the default value anyway), and added an example to the documentation for better clarity.