Remove ContentHandler::deprecated()
authorReedy <reedy@wikimedia.org>
Sat, 8 Oct 2016 12:30:16 +0000 (13:30 +0100)
committerLegoktm <legoktm.wikipedia@gmail.com>
Wed, 12 Oct 2016 23:41:18 +0000 (23:41 +0000)
Now unused, replaced with wfDeprecated() calls specifically

Bug: T145728
Change-Id: Id269bcd2958f23ecbc7f4f06a8c3ab5873c53117

includes/content/ContentHandler.php

index 5755918..3389a00 100644 (file)
@@ -82,15 +82,6 @@ class MWUnknownContentModelException extends MWException {
  * @ingroup Content
  */
 abstract class ContentHandler {
-       /**
-        * Switch for enabling deprecation warnings. Used by ContentHandler::deprecated()
-        * and ContentHandler::runLegacyHooks().
-        *
-        * Once the ContentHandler code has settled in a bit, this should be set to true to
-        * make extensions etc. show warnings when using deprecated functions and hooks.
-        */
-       protected static $enableDeprecationWarnings = false;
-
        /**
         * Convenience function for getting flat text from a Content object. This
         * should only be used in the context of backwards compatibility with code
@@ -1139,25 +1130,6 @@ abstract class ContentHandler {
                return $this->supportsDirectEditing();
        }
 
-       /**
-        * Logs a deprecation warning, visible if $wgDevelopmentWarnings, but only if
-        * self::$enableDeprecationWarnings is set to true.
-        *
-        * @param string $func The name of the deprecated function
-        * @param string $version The version since the method is deprecated. Usually 1.21
-        *   for ContentHandler related stuff.
-        * @param string|bool $component : Component to which the function belongs.
-        *   If false, it is assumed the function is in MediaWiki core.
-        *
-        * @see ContentHandler::$enableDeprecationWarnings
-        * @see wfDeprecated
-        */
-       public static function deprecated( $func, $version, $component = false ) {
-               if ( self::$enableDeprecationWarnings ) {
-                       wfDeprecated( $func, $version, $component, 3 );
-               }
-       }
-
        /**
         * Call a legacy hook that uses text instead of Content objects.
         * Will log a warning when a matching hook function is registered.