Yes looks like the warning became an exception. But it needed to be tested standlone in symfony. Also I'm not really using the RestBundle for it. I was just replacing this class with the symfony 2.4 xml encoder and recognized a change in behavior. But the main change was that it now throws exceptions which was not done before. So the EncoderInterface need to be updated.