Updated the deprecation warnings to 5.0
Merge pull request #16577 from cristianbica/update-deprecation-to-5.0

Updated the deprecation warnings to 5.0