Sonntag, 18. Dezember 2011

Doctrine2/Symfony2 SimpleXML Serialization

I wasted a lot of time on this behaviour, so I'll give a short description of what happened and what was the solution.

Well, our setup contains symfony2 (2.0.4) as well as doctrine2. I store some data from an xml file into an entity using SimpleXML-Parser. This was working well, when suddenly in the dev environment I got the error, that the profiler could not serialize some doctrine2 entity because SimpleXML Elements cannot be serialized. As the error was in the Profiler, I was really confused about what happened.