Skip to content
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

Add fos_rest.serializer.serialize_null to control null value serializati... #480

Merged
merged 1 commit into from Jun 19, 2013

Conversation

@hglattergotz
Copy link
Contributor

@hglattergotz hglattergotz commented Jun 19, 2013

...on

The JMS serializer by default will not serialize keys with a null value.
This new parameter allows control of this behavior via the FOSRestBundle
configuration in app/config/config.yml.
Setting fos_rest.serializer.serialize_null to true will cause the
setSerializeNull() method on the Context object to be called with the
value that is set in the configuration.
Add test case to check that the Context Object has its member
$serializeNull set to the correct value.
Add new parameter to the Resource/doc/configuration-reference.md
documentation file.

…ation

The JMS serializer by default will not serialize keys with a null value.
This new parameter allows control of this behavior via the FOSRestBundle
configuration in app/config/config.yml.
Setting fos_rest.serializer.serialize_null to true will cause the
setSerializeNull() method on the Context object to be called with the
value that is set in the configuration.
Add test case to check that the Context Object has its member
$serializeNull set to the correct value.
Add new parameter to the Resource/doc/configuration-reference.md
documentation file.
lsmith77 added a commit that referenced this pull request Jun 19, 2013
Add fos_rest.serializer.serialize_null to control null value serializati...
@lsmith77 lsmith77 merged commit e290333 into FriendsOfSymfony:master Jun 19, 2013
1 check was pending
1 check was pending
@schmittjoh
default The Travis CI build is in progress
Details
@lsmith77
Copy link
Member

@lsmith77 lsmith77 commented Jun 19, 2013

thank you!

@hglattergotz hglattergotz deleted the hglattergotz:iss_459 branch Jun 19, 2013
@hglattergotz
Copy link
Contributor Author

@hglattergotz hglattergotz commented Jun 19, 2013

Welcome!

@stof
Copy link
Member

@stof stof commented Jun 19, 2013

The serializer settings should be nested into view as they are related to the View part of the bundle, not to a separate serialization part

@stof
Copy link
Member

@stof stof commented Jun 19, 2013

and it should be exposed through the semantic configuration

@lsmith77
Copy link
Member

@lsmith77 lsmith77 commented Jun 19, 2013

done here 82e730a

@titomiguelcosta
Copy link

@titomiguelcosta titomiguelcosta commented Jun 19, 2013

thanks @lsmith77 now everything is back working, I was having an error: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: "The parameter "fos_rest.serializer.serialize_null" must be defined."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants