[ParserOutput] Remove deprecated ::getCategories() method

This was deprecated with warnings in 1.40.

Change-Id: I7b8a86f6efbdd86c1f493db6741c37bfb325e9bb
This commit is contained in:
C. Scott Ananian 2024-04-12 13:00:00 -04:00
parent f257c386c4
commit db2f1ad606
3 changed files with 2 additions and 12 deletions

View file

@ -240,6 +240,8 @@ because of Phabricator reports.
- ipblocks
* ParserOutput::setFlag() and ::getFlag(), deprecated in 1.38, were removed. You
should use ::setOutputFlag() and ::getOutputFlag() instead.
* ParserOutput::getCategories(), deprecated in 1.40, has been removed. You
should use ::getCategoryNames() and ::getCategorySortKey() instead.
* The parser does not substitute the default category sort key at
parse time; this is substituted when the category links table is
updated instead. As a result {{DEFAULTSORT}} will affect all the

View file

@ -618,16 +618,6 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
return array_map( 'strval', array_keys( $this->mCategories ) );
}
/**
* @deprecated since 1.40; use ::getCategoryNames() and
* ::getCategorySortKey() instead. For @internal use ::getCategoryMap()
* may be used, but it is not recommended.
*/
public function &getCategories() {
wfDeprecated( __METHOD__, '1.40' );
return $this->mCategories;
}
/**
* Return category names and sort keys as a map.
*

View file

@ -1281,7 +1281,6 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
$op = $this->setupCategoryTests( $fakeResults, $variantLinkCallback );
$stubPO = $this->createParserOutputStub( [
'getCategories' => $args,
'getCategoryMap' => $args,
] );
@ -1616,7 +1615,6 @@ class OutputPageTest extends MediaWikiIntegrationTestCase {
}
$arrayReturningMethods = [
'getCategories',
'getCategoryMap',
'getFileSearchOptions',
'getHeadItems',