Drop Linker::formatTemplates, deprecated in 1.28 and unused
authorJames D. Forrester <jforrester@wikimedia.org>
Sat, 9 Feb 2019 01:31:42 +0000 (17:31 -0800)
committerJames D. Forrester <jforrester@wikimedia.org>
Sat, 9 Feb 2019 01:43:33 +0000 (17:43 -0800)
Change-Id: I02e677021cdc1fc7ac6da4839a23b15afcfb2296

RELEASE-NOTES-1.33
includes/DummyLinker.php
includes/Linker.php

index f97539b..c07042d 100644 (file)
@@ -211,6 +211,8 @@ because of Phabricator reports.
   this via MediaWiki\MediaWikiServices::getInstance()->getSiteStore() directly.
 * Linker::formatSize, deprecated in 1.28, has been removed (with DummyLinker's).
   Instead, use Language->formatSize() with the relevant Language object.
+* Linker::formatTemplates, deprecated in 1.28, has been removed (along with the
+  version in DummyLinker). You can use TemplatesOnThisPageFormatter directly.
 
 === Deprecations in 1.33 ===
 * The configuration option $wgUseESI has been deprecated, and is expected
index be2d90b..e46c45e 100644 (file)
@@ -403,25 +403,6 @@ class DummyLinker {
                );
        }
 
-       /**
-        * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
-        */
-       public function formatTemplates(
-               $templates,
-               $preview = false,
-               $section = false,
-               $more = null
-       ) {
-               wfDeprecated( __METHOD__, '1.28' );
-
-               return Linker::formatTemplates(
-                       $templates,
-                       $preview,
-                       $section,
-                       $more
-               );
-       }
-
        public function formatHiddenCategories( $hiddencats ) {
                return Linker::formatHiddenCategories( $hiddencats );
        }
index b54723a..cc1df39 100644 (file)
@@ -1895,47 +1895,6 @@ class Linker {
                }
        }
 
-       /**
-        * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
-        *
-        * Returns HTML for the "templates used on this page" list.
-        *
-        * Make an HTML list of templates, and then add a "More..." link at
-        * the bottom. If $more is null, do not add a "More..." link. If $more
-        * is a Title, make a link to that title and use it. If $more is a string,
-        * directly paste it in as the link (escaping needs to be done manually).
-        * Finally, if $more is a Message, call toString().
-        *
-        * @since 1.16.3. $more added in 1.21
-        * @param Title[] $templates Array of templates
-        * @param bool $preview Whether this is for a preview
-        * @param bool $section Whether this is for a section edit
-        * @param Title|Message|string|null $more An escaped link for "More..." of the templates
-        * @return string HTML output
-        */
-       public static function formatTemplates( $templates, $preview = false,
-               $section = false, $more = null
-       ) {
-               wfDeprecated( __METHOD__, '1.28' );
-
-               $type = false;
-               if ( $preview ) {
-                       $type = 'preview';
-               } elseif ( $section ) {
-                       $type = 'section';
-               }
-
-               if ( $more instanceof Message ) {
-                       $more = $more->toString();
-               }
-
-               $formatter = new TemplatesOnThisPageFormatter(
-                       RequestContext::getMain(),
-                       MediaWikiServices::getInstance()->getLinkRenderer()
-               );
-               return $formatter->format( $templates, $type, $more );
-       }
-
        /**
         * Returns HTML for the "hidden categories on this page" list.
         *