Add deprecation warning mechanism.