Fix for SimpleXML in XmlEncoder
Fix for SimpleXML in XmlEncoder

Check first for special objects like SimpleXMLElement and Traversable and the check for is_object.

symfony/Serializer,symfony/serializer