Mark Linker::link() as @deprecated
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 12 Jul 2016 22:26:53 +0000 (15:26 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 26 Jul 2016 14:19:46 +0000 (07:19 -0700)
...and add a link to the on-wiki LinkRenderer documentation to the
class. Actual wfDeprecated and replacements in all the uses to come in
follow-up patches.

Change-Id: I2fefb6c38153028d2cc68c13bc62434d3df69cd2

RELEASE-NOTES-1.28
includes/Linker.php
includes/linker/LinkRenderer.php

index 780cec6..339cbfa 100644 (file)
@@ -80,6 +80,10 @@ changes to languages because of Phabricator reports.
   login and visiting the login page while already logged in.
 * ResourceLoader::makeLoaderURL() was removed (deprecated since 1.24).
 * $.fn.liveAndTestAtStart was removed (deprecated since 1.24).
+* Linker::link() and Linker::linkKnown() were deprecated; please instead use
+  MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks
+  were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd
+  respectively. See docs/hooks.txt for the specific changes needed for those hooks.
 
 == Compatibility ==
 
index 1979e44..5e540b9 100644 (file)
@@ -170,6 +170,7 @@ class Linker {
         * link() replaces the old functions in the makeLink() family.
         *
         * @since 1.18 Method exists since 1.16 as non-static, made static in 1.18.
+        * @deprecated since 1.28, use MediaWiki\Linker\LinkRenderer instead
         *
         * @param Title $target Can currently only be a Title, but this may
         *   change to support Images, literal URLs, etc.
@@ -245,7 +246,9 @@ class Linker {
 
        /**
         * Identical to link(), except $options defaults to 'known'.
+        *
         * @since 1.16.3
+        * @deprecated since 1.28, use MediaWiki\Linker\LinkRenderer instead
         * @see Linker::link
         * @return string
         */
index 2d67b87..c203a16 100644 (file)
@@ -36,6 +36,7 @@ use TitleFormatter;
 /**
  * Class that generates HTML <a> links for pages.
  *
+ * @see https://www.mediawiki.org/wiki/Manual:LinkRenderer
  * @since 1.28
  */
 class LinkRenderer {