I have some trouble with JMS Serializer - I need to deserialize a XML but i have an exception.
For example, for the xml
<test><name>Test</name></test>
I'm doing :
$xml = $paramFetcher->get('xml');
$serializer = SerializerBuilder::create()->build();
$serializer->deserialize($stack, MyObject::class, 'xml');
And with that, JMS return :
<exception class="JMS\Parser\SyntaxErrorException" message="Expected end of input, but got ">" of type T_CLOSE_BRACKET at position 37 (0-based).">
at JMS\Serializer\Serializer->deserialize('<test><name>Test</name></test>', 'MyObject::class', 'xml')
The XML is sent in POST 'form-data' with other RequestParam.
jms/serializer-bundle 2.4.2
The problem was solved by changing a namespace in one of my entities. I checked all namespace, and one of this namespace was not correct.