made EncoderRegistry compatible with symfony serializer master