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

Promote builtin serializer instead of JMS #5074

Closed

Conversation

javiereguiluz
Copy link
Member

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed tickets #5069

@stof
Copy link
Member

stof commented Mar 11, 2015

I'm not sure this should be done in the 2.3 branch. The 2.3 serializer is far from competing with JMSSerializer (the 2.7 serializer can)

@javiereguiluz
Copy link
Member Author

@stof is right: serializer has improved a lot in the most recent versions of Symfony, so let's merge it in 2.7 branch then.

@xabbuh
Copy link
Member

xabbuh commented Mar 11, 2015

@javiereguiluz Did you check if your changes can be cleanly applied on the 2.7 branch? @dunglas did quite some changes on that branch.

@wouterj
Copy link
Member

wouterj commented Mar 11, 2015

-1, JMS Serializer still has more features than the Symfony Serializer.

@dunglas
Copy link
Member

dunglas commented Mar 11, 2015

@wouterj it has more features, but are these extra features useful for the average project?
Promoting the built-in Serializer has many advantages:

  • no external dependency required
  • no license issue
  • usage very similar to other components (XML and YAML mappings for instance)

Any one interested in a more advanced solutions can, as for any other part of the framework, check Packagist, blog posts and so on then install another library.

To move forward, what features of JMSSerializer you miss in the built-in Component?

@wouterj
Copy link
Member

wouterj commented Mar 25, 2015

I don't know what features are missing from the Serializer component (I don't use either one). However, I believe there still are some differences. What about listing reasons why one would use the JMS one or the Symfony one? (you already made a good start in your comment)

@dunglas
Copy link
Member

dunglas commented Mar 25, 2015

I'll said: use JMSSerializer if you want to deal in an advanced manner with XML or Doctrine, if you want to use a bundle using JMSSerializer and if you don't care about the license issue. In any other case, use the built-in Serializer.

@ghost
Copy link

ghost commented May 5, 2015

@dunglas : can you be more specific? What are some specific things that you can do with the JMSSerializerBundle that you can't do with with the Symfony Serializer?

@dunglas
Copy link
Member

dunglas commented May 5, 2015

@jrobeson There is no way to do things doable with @XmlValue, @XmlAttribute etc with JMSSerializer... The only solution is to create a custom normalizer (and there is no plan to add such things because IMO creating a custom normalizer is cleaner than "polluting" the entity with such annotations).

@ghost
Copy link

ghost commented May 5, 2015

so only XML stuff?

@dunglas
Copy link
Member

dunglas commented May 5, 2015

@jrobeson mainly, but the design of JMSSerializer and Symfony Serializer are different on many points (type handling, extension, group and versions management).

@xabbuh
Copy link
Member

xabbuh commented May 6, 2015

One thing that I am currently missing, but for which I didn't find the time to dig into the code to find out how to do it properly are discriminator maps.

@javiereguiluz
Copy link
Member Author

I think it's time to make a decision regarding this PR, so we can merge it or close it. Thanks.

@dunglas
Copy link
Member

dunglas commented May 29, 2015

👍 to merge it

@javiereguiluz
Copy link
Member Author

Closing it in favor of #5429, which uses the right 2.7 branch.

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

Successfully merging this pull request may close these issues.

5 participants