| Q | A
| ---------------- | -----
| Bug report? | no
| Feature request? | no
| BC Break report? | no
| RFC? | yes
| Sylius version | 1.x
JMS Serializer is a pain to deal with, and it just doesn't do the sensible thing out of the box. For example:
https://github.com/schmittjoh/JMSSerializerBundle/issues/639
In contrast, Symfony's ObjectNormalizer through the instantiateObject method even supports matching properties to constructor parameters.
Testimony: At API Platform, we use the Symfony Serializer.
Full disclosure: @dunglas who created API Platform is a member on the Symfony core team. He was the main person who made Symfony Serializer awesome.
@pamil I'd like to try doing this one. I may start today.
It's a great idea and I'm personally all for it, but for the project, it would probably result in either:
a) need to support both JMS and Symfony serializers
b) dropping support for JMS serializer which is possibly a BC break indeed
Do you have some ideas how we can tackle it without breaking existing applications (they might extend JMS mappings or define new ones) and too much maintenance effort?
To provide an upgrade path, we could keep the JMS Serializer mappings around but deprecate its use in Sylius. We could provide Symfony Serializer mappings, it shouldn't cause any issues.
Yes, for the transition period, we must support both JMS Serializer and Symfony Serializer. And in the next major version, we could drop support for JMS Serializer and remove the mapping files.
@teohhanhui @pamil
I totally agree with this solution to deprecate jms serialization.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.
@pamil We need a do-not-stale here.
Fully agreed.
totally agreed. JMS is very bad solution, we faced with trouble every time when need to override serialization
Bump on this one.
I can help if needed.
No, I want to help !! JMS is such a pain to use...
+1, also ur team can take look at https://github.com/liip/serializer, i hope in near future it can become drop-in replace for jms.
IMO it's more relevant to use native serializer. I've never used Liip, but I think that using Symfony core components is a better choice for LTS and compatibility.
Most helpful comment
To provide an upgrade path, we could keep the JMS Serializer mappings around but deprecate its use in Sylius. We could provide Symfony Serializer mappings, it shouldn't cause any issues.
Yes, for the transition period, we must support both JMS Serializer and Symfony Serializer. And in the next major version, we could drop support for JMS Serializer and remove the mapping files.