From 221a33208c02ee3d163c95db33a76812d73aa2db Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 26 Oct 2023 16:04:31 -0400 Subject: [PATCH] Deprecate ParserOutput::setLanguageLinks() Core does not use ::setLanguageLinks() at all any more, and only a very small number of extensions use it: https://codesearch.wmcloud.org/search/?q=-%3EsetLanguageLinks&files=&excludeFiles=&repos= This can be deprecated and (eventually) removed as we prepare to update ::addLanguageLink(). Bug: T296019 Change-Id: I5bcbc65c8dccb6e3037f528bd9e7e9e27514ea5b --- RELEASE-NOTES-1.42 | 1 + includes/parser/ParserOutput.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES-1.42 b/RELEASE-NOTES-1.42 index d7c75c4ff96..5f7f42ca47f 100644 --- a/RELEASE-NOTES-1.42 +++ b/RELEASE-NOTES-1.42 @@ -108,6 +108,7 @@ because of Phabricator reports. Vuex 4 will remain accessible for the foreseeable future. Pinia should be used for new projects. * Title::getBrokenLinksFrom() has been deprecated. +* ParserOutput::setLanguageLinks() has been deprecated. * … === Other changes in 1.42 === diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 15e2ea05574..bc826d11c37 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -810,6 +810,9 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector { return wfSetVar( $this->mText, $text, true ); } + /** + * @deprecated since 1.42, use ::addLanguageLink() instead. + */ public function setLanguageLinks( $ll ) { return wfSetVar( $this->mLanguageLinks, $ll ); }