Symfony jms serializer enable when needed
Clash Royale CLAN TAG #URR8PPP Symfony jms serializer enable when needed I have jms serializer and in my class entity have annotation. I have case when I need apply jms serializer annotation only in some case. How to do this ? First I think need move annotation from entity class to uml maybe and create some handler where I can enable this annotation for this entity, in the rest of the time jms are not applicable to entity my entity /** * @AnnotationExclusionPolicy("all") */ class Application implements ContainsRecordedMessages { /** * @var int * * @AnnotationGroups({ * "get_application" * }) * @AnnotationExpose() */ private $id; /** * @var int * * @AnnotationGroups({ * "post_application" * }) * @AnnotationSerializedName("company_id") * @AnnotationExpose() */ private $companyId; /** * @var string * * @AnnotationGroups({ * "post_application" * }) * @AnnotationSerializedName("channel_sale") ...