PIM-3358 : fix sprintf issue and add doctrine writer spec