Hard-deprecate Title::getCdnUrls

Depends-On: Ib709a6f7d9d89f3906c5578d25d9036fd326f1c5
Change-Id: I7be53aa758761292a1544bd8273575c7c240abc9
This commit is contained in:
James D. Forrester 2024-01-26 14:02:23 -05:00 committed by DannyS712
parent 067cd38422
commit 1298b4fc2c
3 changed files with 4 additions and 1 deletions

View file

@ -534,6 +534,7 @@ because of Phabricator reports.
* TempUserConfig::getMatchPattern has been deprecated, use
TempUserConfig::getMatchPatterns instead.
* (T230025) Title::purgeSquid(), deprecated in 1.35, now emits warnings.
* Title::getCdnUrls(), deprecated in 1.35, now emits warnings.
* The rarely-used convenience method Xml::wrapClass() is now deprecated. Instead
you can use Xml::tags('span', ['class'=>'foo'], 'bar').
* $wgUseSameSiteLegacyCookies has been deprecated and will be ignored.

View file

@ -2929,10 +2929,11 @@ class Title implements LinkTarget, PageIdentity, IDBAccessObject {
/**
* Get a list of URLs to purge from the CDN cache when this page changes.
*
* @deprecated since 1.35 Use HtmlCacheUpdater
* @deprecated since 1.35 Use HtmlCacheUpdater; hard-deprecated in 1.42
* @return string[]
*/
public function getCdnUrls() {
wfDeprecated( __METHOD__, '1.35' );
$htmlCache = MediaWikiServices::getInstance()->getHtmlCacheUpdater();
return $htmlCache->getUrls( $this );
}

View file

@ -1841,6 +1841,7 @@ class TitleTest extends MediaWikiIntegrationTestCase {
* @covers MediaWiki\Title\Title::getCdnUrls
*/
public function testGetCdnUrls() {
$this->hideDeprecated( Title::class . '::getCdnUrls' );
$this->assertEquals(
[
'https://example.org/wiki/Example',