X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontext%2FDerivativeContext.php;h=e77a058d1d8f9a1b011decbfcfd47ea321efef7f;hb=8dfae8aecebbce32861aaf74133baeaee24e56e0;hp=1b881e49ddb56083cb3dadac6217907078f8b108;hpb=23299ca8790bcf1aebcf54e0932b94338e630474;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/context/DerivativeContext.php b/includes/context/DerivativeContext.php index 1b881e49dd..e77a058d1d 100644 --- a/includes/context/DerivativeContext.php +++ b/includes/context/DerivativeContext.php @@ -18,6 +18,8 @@ * @author Daniel Friesen * @file */ +use Liuggio\StatsdClient\Factory\StatsdDataFactory; +use MediaWiki\MediaWikiServices; /** * An IContextSource implementation which will inherit context from another source @@ -67,11 +69,6 @@ class DerivativeContext extends ContextSource implements MutableContext { */ private $config; - /** - * @var Stats - */ - private $stats; - /** * @var Timing */ @@ -110,14 +107,12 @@ class DerivativeContext extends ContextSource implements MutableContext { /** * Get the stats object * - * @return BufferingStatsdDataFactory + * @deprecated since 1.27 use a StatsdDataFactory from MediaWikiServices (preferably injected) + * + * @return StatsdDataFactory */ public function getStats() { - if ( !is_null( $this->stats ) ) { - return $this->stats; - } else { - return $this->getContext()->getStats(); - } + return MediaWikiServices::getInstance()->getStatsdDataFactory(); } /**