aboutsummaryrefslogtreecommitdiffstats
path: root/RELEASE-NOTES-1.40
diff options
context:
space:
mode:
authorC. Scott Ananian <cscott@cscott.net>2023-03-10 09:32:36 -0500
committerC. Scott Ananian <cscott@cscott.net>2023-03-10 10:02:42 -0500
commitd2446a77dd2b69d64710bcb81528965626deff4a (patch)
tree5fa035382f558e0b64809fbd6e2355c5f2471498 /RELEASE-NOTES-1.40
parenta44c6375722081156118545252d0ea34fdea69d5 (diff)
downloadmediawikicore-d2446a77dd2b69d64710bcb81528965626deff4a.tar.gz
mediawikicore-d2446a77dd2b69d64710bcb81528965626deff4a.zip
Deprecate ParserOutput::getCategories()
This undocumented method returns a reference to ParserOutput's private storage array, yet very few callers actually require a reference or try to use this to mutate the internal storage. Further, the keys of the array can be converted to `int` when the category names are numeric, which can further confuse users. Most users found through codesearch can/should use ::getCategoryNames() instead. Add a new ::getCategorySortKey() method to provide access to the sort keys for those few callers who require them, in a manner which doesn't expose that the internal `mCategories` array stores numeric category names as 'int'. Bug: T331727 Change-Id: I8dc85e76bfbb9ed49a603d990c14b7ee798bd821
Diffstat (limited to 'RELEASE-NOTES-1.40')
-rw-r--r--RELEASE-NOTES-1.402
1 files changed, 2 insertions, 0 deletions
diff --git a/RELEASE-NOTES-1.40 b/RELEASE-NOTES-1.40
index 2605b946ea9d..8accafa9d1df 100644
--- a/RELEASE-NOTES-1.40
+++ b/RELEASE-NOTES-1.40
@@ -345,6 +345,8 @@ because of Phabricator reports.
* ParserOptions::{get,set}ExternalLinkTarget() and
ParserOptions::{get,set}MaxTemplateDepth() have been deprecated and marked
for @internal use only.
+* ParserOutput::getCategories() has been deprecated; use ::getCategoryNames()
+ and ::getCategorySortKey() instead.
* TransactionProfiler::setSilenced() is deprecated.
Use TransactionProfiler::silenceForScope() instead.
* The following methods in the Title class, deprecated since 1.37, emits