This API was deprecated before, but without deprecation warning and migration doc. This commit added deprecation warning and migration doc to it.