Merge "Fix Postgres support"
[lhc/web/wiklou.git] / includes / context / ContextSource.php
index ea5278f..2264670 100644 (file)
@@ -19,6 +19,7 @@
  * @file
  */
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * The simplest way of implementing IContextSource is to hold a RequestContext as a
@@ -169,10 +170,10 @@ abstract class ContextSource implements IContextSource {
         * @deprecated since 1.27 use a StatsdDataFactory from MediaWikiServices (preferably injected)
         *
         * @since 1.25
-        * @return StatsdDataFactory
+        * @return MediawikiStatsdDataFactory
         */
        public function getStats() {
-               return $this->getContext()->getStats();
+               return MediaWikiServices::getInstance()->getStatsdDataFactory();
        }
 
        /**