Replace the symfony serializer with jms serializer.
Reformat code.