Deprecation warning improvement idea

@david used deprecation warning a bit in recent improvements on auth providers. And Discourse has changed a lot of site settings too. I’m thinking we probably need to provide more information about deprecation so that plugin authors know what’s going to be deprecated.

So far, Discourse.deprecate only outputs a message. But I think we need to add two more named arguments.
https://github.com/discourse/discourse/blob/555f467727e44ac1fc6659846116e7bcd65f6f07/lib/discourse.rb#L605-L620

  1. deprecated_version: (optional) The version we started to deprecate an API.
  2. drop_version: The version we plan to drop this API. This also serves as a good documentation.
7 Likes