Merge "Hard deprecate LinkCache::addGoodLinkObj"
This commit is contained in:
commit
e0f7759256
3 changed files with 5 additions and 2 deletions
|
|
@ -268,6 +268,7 @@ because of Phabricator reports.
|
|||
::getArchivedRevisionRecord, ::getPreviousRevisionRecord and
|
||||
::getLastRevisionId.
|
||||
- Use ArchivedRevisionLookup::hasArchivedRevisions instead of ::isDeleted.
|
||||
* LinkCache::addGoodLinkObj() has been hard deprecated.
|
||||
* …
|
||||
|
||||
=== Other changes in 1.38 ===
|
||||
|
|
|
|||
1
includes/cache/LinkCache.php
vendored
1
includes/cache/LinkCache.php
vendored
|
|
@ -282,6 +282,7 @@ class LinkCache implements LoggerAwareInterface {
|
|||
public function addGoodLinkObj( $id, $page, $len = -1, $redir = null,
|
||||
$revision = 0, $model = null, $lang = null
|
||||
) {
|
||||
wfDeprecated( __METHOD__, '1.38' );
|
||||
$this->addGoodLinkObjFromRow( $page, (object)[
|
||||
'page_id' => (int)$id,
|
||||
'page_namespace' => $page->getNamespace(),
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use Wikimedia\TestingAccessWrapper;
|
|||
*/
|
||||
class TitleTest extends MediaWikiIntegrationTestCase {
|
||||
use DummyServicesTrait;
|
||||
use LinkCacheTestTrait;
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
|
@ -367,10 +368,10 @@ class TitleTest extends MediaWikiIntegrationTestCase {
|
|||
* @covers Title::clearCaches
|
||||
*/
|
||||
public function testClearCaches() {
|
||||
$linkCache = MediaWikiServices::getInstance()->getLinkCache();
|
||||
$linkCache = $this->getServiceContainer()->getLinkCache();
|
||||
|
||||
$title1 = Title::newFromText( 'Foo' );
|
||||
$linkCache->addGoodLinkObj( 23, $title1 );
|
||||
$this->addGoodLinkObject( 23, $title1 );
|
||||
|
||||
Title::clearCaches();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue