-
-
Notifications
You must be signed in to change notification settings - Fork 585
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 format output option #640
Add format output option #640
Conversation
AyrtonRicardo
commented
Sep 8, 2016
- Add test
- Add format output option
- Add test
this is a XML specific option, and should not be part of the global context. have a look to https://github.com/schmittjoh/serializer/blob/master/src/JMS/Serializer/JsonSerializationVisitor.php#L48 for an alternative implementation. 4be3f29 added a similar feature for JSON |
@goetas I agree with you. I'll do PR to SerializerBundle with the option on the DI after your OK here! 😄 |
looks good to me! 👍 |
@@ -44,10 +44,14 @@ class XmlSerializationVisitor extends AbstractVisitor | |||
private $nullWasVisited; | |||
private $objectMetadataStack; | |||
|
|||
/** @var boolean */ | |||
private $formatOutput; |
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.
set it default to false, please
we had some bugs fro such kind of implementation (#317)
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.
It's default true
, setted on constructor. It's default true
because it was true
before.