function deprecated(fnName, newModule, newPackage, ctx, fn) {
  var warned = false;
  if ("development" !== 'production') {
    var newFn = function () {
      "development" !== 'production' ? warning(warned,
      // Require examples in this string must be split to prevent React's
      // build tools from mistaking them for real requires.
      // Otherwise the build tools will attempt to build a '%s' module.
      'React.%s is deprecated. Please use %s.%s from require' + '(\'%s\') ' + 'instead.', fnName, newModule, fnName, newPackage) : undefined;
      warned = true;
      return fn.apply(ctx, arguments);
    };
    // We need to make sure all properties of the original fn are copied over.
    // In particular, this is needed to support PropTypes
    return assign(newFn, fn);
  }

  return fn;
}
This will log a single deprecation notice per function and forward the call
on to the new API.

@param {string} fnName The name of the function
@param {string} newModule The module that fn will exist in
@param {string} newPackage The module that fn will exist in
@param {*} ctx The context this forwarded call should run in
@param {function} fn The function to forward on to
@return {function} The function that will warn once and then call fn