Remove deprecateds

Hi, can we remove this deprecated function to avoid PHP deprecated logs

thanks