<?php

use MediaWiki\MediaWikiServices;

/**
 * A single 'item' in the Spelling Dictionary Admin Links page
 */
class SDItem {
	public $link;

	static function showPage( $page_title, $desc = null, $query = [] ) {
		$item = new SDItem();
		$item->link = Linker::link( $page_title, $desc );
		return $item;
	}

	static function customSpecialPage( $page_title ) {
		$item = new SDItem();

		$page = MediaWikiServices::getInstance()
			->getSpecialPageFactory()
			->getPage( $page_title );

		$item->link = Linker::link( $page->getPageTitle(), $page->getDescription() );
		return $item;
	}

}

<?php

use MediaWiki\MediaWikiServices;

/**
 * A single 'item' in the Spelling Dictionary Admin Links page
 */
class SDItem {
	public $link;

	static function showPage( $page_title, $desc = null, $query = [] ) {
		$item = new SDItem();
		$item->link = MediaWikiServices::getInstance()
			->getLinkRenderer()->makeLink( $page_title, $desc );

		return $item;
	}

	static function customSpecialPage( $page_title ) {
		$item = new SDItem();
		$services = MediaWikiServices::getInstance();

		$page = $services
			->getSpecialPageFactory()
			->getPage( $page_title );

		$item->link = $services->getLinkRenderer()->makeLink(
			$page->getPageTitle(),
			$page->getDescription()
		);

		return $item;
	}

}

Replace usage of Linker with LinkRenderer service
Replace usage of Linker with LinkRenderer service

Bug: T279373
Change-Id: Iaeea79133391a3a13cdc58f8a3cde34eb9425234
