Add deprecation warnings for the old APIs.