Closed greg0ire closed 4 years ago
I'm for solution 2, because it's no common problem / component
a) - make reusable package for 2 types (depends of. "jms_serializer.subscribing_handler" is bad idea.
b) - OK
c) - If we dont how useful od it, then b look event better
What about d ? Move serializer to form-extensionds. It will be used in all 4 bundles. Also look at BaseDoctrineORMSerializationType. It look like is both are related to jms_serializer. Ecommerce basket API form can be example.
API form
Oh so this serializer is used in APIs that are used to display forms?! If yes d) sounds like a really great option.
API form
Oh so this serializer is used in APIs that are used to display forms?! If yes d) sounds like a really great option.
It look like every *Type extends Base BaseDoctrineORMSerializationType
base on API. Also all this Types have handlers extends BaseSerializerHandler.
@greg0ire can u check it too, to be sure in 100%? I'm on phone now.
Looks correct:
@core23 WDYT?
Dependents of this namespace include:
Documentation can be found at https://github.com/sonata-project/SonataCoreBundle/blob/c1bbd519481c58ed787527d9b48c7a8238c23107/docs/reference/serialization.rst
TL;DR: it's about serializing/deserializing an object to/from its id + a manager (meaning a persistence manager)
The only 3 solutions I see are:
a) create a package with the 2 types b) copy the 2 types to all of the 4 packages above c) drop features related to this (I have no idea how useful they are)
I'm reluctantly leaning towards a), what about you?