diff options
author | Irina Balaban <ibalaban@fandom.com> | 2024-05-05 11:33:19 +0300 |
---|---|---|
committer | Irina Balaban <ibalaban@fandom.com> | 2024-05-05 12:40:30 +0300 |
commit | dc989f680f583c9a1aa32175f537183b6fee6610 (patch) | |
tree | e96b1d7fb51162d96098a455f150956d5a795456 /includes/Html | |
parent | b074b829aeffe832713a6846e7ebe67f477c1bce (diff) | |
download | mediawikicore-dc989f680f583c9a1aa32175f537183b6fee6610.tar.gz mediawikicore-dc989f680f583c9a1aa32175f537183b6fee6610.zip |
fix: use objectcachefactory methods instead of deprecated objectcache methods
Bug: T363770
Change-Id: Ie732f6925ec2b1316a60bebbe3c27f963c9dacb1
Diffstat (limited to 'includes/Html')
-rw-r--r-- | includes/Html/TemplateParser.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/Html/TemplateParser.php b/includes/Html/TemplateParser.php index 90d010bda70a..4e921cad4ddb 100644 --- a/includes/Html/TemplateParser.php +++ b/includes/Html/TemplateParser.php @@ -7,7 +7,6 @@ use FileContentsHasher; use LightnCandy\LightnCandy; use MediaWiki\MainConfigNames; use MediaWiki\MediaWikiServices; -use ObjectCache; use RuntimeException; use UnexpectedValueException; @@ -63,7 +62,8 @@ class TemplateParser { */ public function __construct( $templateDir = null, ?BagOStuff $cache = null ) { $this->templateDir = $templateDir ?: __DIR__ . '/../templates'; - $this->cache = $cache ?: ObjectCache::getLocalServerInstance( CACHE_ANYTHING ); + $this->cache = $cache ?: MediaWikiServices::getInstance()->getObjectCacheFactory() + ->getLocalServerInstance( CACHE_ANYTHING ); // Do not add more flags here without discussion. // If you do add more flags, be sure to update unit tests as well. |