Category : jms

I try to create XML file. I have 2 arrays (Products and Categories). Each array is serialized with XmlList annotation and it has the same structure. Main class: /** * Products * @var Product[]|ArrayCollection * @SerializerType("ArrayCollection<DtoSitemapProduct>") * @XmlList(inline=true, entry="url", namespace="products") */ protected $products; /** * Categories * * @Required() * @XmlList(inline=true, entry="url", namespace="categories") * @SerializerType("ArrayCollection<DtoSitemapCategory>") ..

Read more

I send a get http request from angular side to symfony to get command details, I have many nested json objects and Circular Reference, I’m trying to set MaxDepth to the related entity and as the documentation of jms said add this line $serializer->serialize($command, ‘json’, SerializationContext::create()->enableMaxDepthChecks()); to create a serializer context and enable the maxDepth ..

Read more