[MediaWiki-commits] [Gerrit] mediawiki/core[master]: statsd: Rename MediawikiStatsdDataFactory to IBufferingStats...

2017-07-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363997 )

Change subject: statsd: Rename MediawikiStatsdDataFactory to 
IBufferingStatsdDataFactory
..


statsd: Rename MediawikiStatsdDataFactory to IBufferingStatsdDataFactory

Follows-up I2874175647e (7fdc3d09a3b).

* Avoid "MediaWiki" in class names. If unavoidable, always camelcase.
* Use a more descriptive name, matching the implementing the class 
("Buffering").
* Use "I" prefix for consistency with other MediaWiki-provided interfaces.
  (Avoid "Interface" suffix, which is foreign to MediaWiki and is only used
  in the StatsdClient namespace, which this interface is not in).

Bug: T166354
Change-Id: I06de59122625f9c23e7c1a1bfa69a7ddabbf379e
---
M autoload.php
M includes/MediaWikiServices.php
M includes/context/ContextSource.php
M includes/context/DerivativeContext.php
M includes/context/IContextSource.php
M includes/context/RequestContext.php
M includes/libs/stats/BufferingStatsdDataFactory.php
R includes/libs/stats/IBufferingStatsdDataFactory.php
M includes/libs/stats/NullStatsdDataFactory.php
M tests/phpunit/includes/MediaWikiServicesTest.php
10 files changed, 14 insertions(+), 12 deletions(-)

Approvals:
  Smalyshev: Looks good to me, but someone else must approve
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/autoload.php b/autoload.php
index 2560bdb..88b6170 100644
--- a/autoload.php
+++ b/autoload.php
@@ -604,6 +604,7 @@
'HttpError' => __DIR__ . '/includes/exception/HttpError.php',
'HttpStatus' => __DIR__ . '/includes/libs/HttpStatus.php',
'IApiMessage' => __DIR__ . '/includes/api/ApiMessage.php',
+   'IBufferingStatsdDataFactory' => __DIR__ . 
'/includes/libs/stats/IBufferingStatsdDataFactory.php',
'ICacheHelper' => __DIR__ . '/includes/cache/CacheHelper.php',
'IContextSource' => __DIR__ . '/includes/context/IContextSource.php',
'IDBAccessObject' => __DIR__ . '/includes/dao/IDBAccessObject.php',
@@ -964,7 +965,6 @@
'MediaWiki\\Widget\\TitleInputWidget' => __DIR__ . 
'/includes/widget/TitleInputWidget.php',
'MediaWiki\\Widget\\UserInputWidget' => __DIR__ . 
'/includes/widget/UserInputWidget.php',
'MediaWiki\\Widget\\UsersMultiselectWidget' => __DIR__ . 
'/includes/widget/UsersMultiselectWidget.php',
-   'MediawikiStatsdDataFactory' => __DIR__ . 
'/includes/libs/stats/MediawikiStatsdDataFactory.php',
'MemCachedClientforWiki' => __DIR__ . 
'/includes/compat/MemcachedClientCompat.php',
'MemcLockManager' => __DIR__ . 
'/includes/libs/lockmanager/MemcLockManager.php',
'MemcachedBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/MemcachedBagOStuff.php',
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index ea0ec15..84fc959 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -9,7 +9,7 @@
 use GenderCache;
 use GlobalVarConfig;
 use Hooks;
-use MediawikiStatsdDataFactory;
+use IBufferingStatsdDataFactory;
 use Wikimedia\Rdbms\LBFactory;
 use LinkCache;
 use Wikimedia\Rdbms\LoadBalancer;
@@ -447,7 +447,7 @@
 
/**
 * @since 1.27
-* @return MediawikiStatsdDataFactory
+* @return IBufferingStatsdDataFactory
 */
public function getStatsdDataFactory() {
return $this->getService( 'StatsdDataFactory' );
diff --git a/includes/context/ContextSource.php 
b/includes/context/ContextSource.php
index 36d6df2..434201a 100644
--- a/includes/context/ContextSource.php
+++ b/includes/context/ContextSource.php
@@ -170,7 +170,7 @@
 * @deprecated since 1.27 use a StatsdDataFactory from 
MediaWikiServices (preferably injected)
 *
 * @since 1.25
-* @return MediawikiStatsdDataFactory
+* @return IBufferingStatsdDataFactory
 */
public function getStats() {
return MediaWikiServices::getInstance()->getStatsdDataFactory();
diff --git a/includes/context/DerivativeContext.php 
b/includes/context/DerivativeContext.php
index 9c3c42a..0d0c149 100644
--- a/includes/context/DerivativeContext.php
+++ b/includes/context/DerivativeContext.php
@@ -109,7 +109,7 @@
 *
 * @deprecated since 1.27 use a StatsdDataFactory from 
MediaWikiServices (preferably injected)
 *
-* @return MediawikiStatsdDataFactory
+* @return IBufferingStatsdDataFactory
 */
public function getStats() {
return MediaWikiServices::getInstance()->getStatsdDataFactory();
diff --git a/includes/context/IContextSource.php 
b/includes/context/IContextSource.php
index d13e1a5..895e9e4 100644
--- a/includes/context/IContextSource.php
+++ b/includes/context/IContextSource.php
@@ -131,7 +131,7 @@
 * @deprecated since 1.27 use a StatsdDataFactory from 
MediaWikiServices (preferably injected)
 *
 * @since 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: statsd: Rename MediawikiStatsdDataFactory to IBufferingStats...

2017-07-07 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363997 )

Change subject: statsd: Rename MediawikiStatsdDataFactory to 
IBufferingStatsdDataFactory
..

statsd: Rename MediawikiStatsdDataFactory to IBufferingStatsdDataFactory

Follows-up I2874175647e (7fdc3d09a3b).

* Avoid "MediaWiki" in class names. If unavoidable, always camelcase.
* Use a more descriptive name, matching the implementing the class 
("Buffering").
* Use "I" prefix for consistency with other MediaWiki-provided interfaces.
  (Avoid "Interface" suffix, which is foreign to MediaWiki and is only used
  in the StatsdClient namespace, which this interface is not in).

Bug: T166354
Change-Id: I06de59122625f9c23e7c1a1bfa69a7ddabbf379e
---
M autoload.php
M includes/MediaWikiServices.php
M includes/context/ContextSource.php
M includes/context/DerivativeContext.php
M includes/context/IContextSource.php
M includes/context/RequestContext.php
M includes/libs/stats/BufferingStatsdDataFactory.php
R includes/libs/stats/IBufferingStatsdDataFactory.php
M includes/libs/stats/NullStatsdDataFactory.php
M tests/phpunit/includes/MediaWikiServicesTest.php
10 files changed, 14 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/363997/1

diff --git a/autoload.php b/autoload.php
index 2560bdb..88b6170 100644
--- a/autoload.php
+++ b/autoload.php
@@ -604,6 +604,7 @@
'HttpError' => __DIR__ . '/includes/exception/HttpError.php',
'HttpStatus' => __DIR__ . '/includes/libs/HttpStatus.php',
'IApiMessage' => __DIR__ . '/includes/api/ApiMessage.php',
+   'IBufferingStatsdDataFactory' => __DIR__ . 
'/includes/libs/stats/IBufferingStatsdDataFactory.php',
'ICacheHelper' => __DIR__ . '/includes/cache/CacheHelper.php',
'IContextSource' => __DIR__ . '/includes/context/IContextSource.php',
'IDBAccessObject' => __DIR__ . '/includes/dao/IDBAccessObject.php',
@@ -964,7 +965,6 @@
'MediaWiki\\Widget\\TitleInputWidget' => __DIR__ . 
'/includes/widget/TitleInputWidget.php',
'MediaWiki\\Widget\\UserInputWidget' => __DIR__ . 
'/includes/widget/UserInputWidget.php',
'MediaWiki\\Widget\\UsersMultiselectWidget' => __DIR__ . 
'/includes/widget/UsersMultiselectWidget.php',
-   'MediawikiStatsdDataFactory' => __DIR__ . 
'/includes/libs/stats/MediawikiStatsdDataFactory.php',
'MemCachedClientforWiki' => __DIR__ . 
'/includes/compat/MemcachedClientCompat.php',
'MemcLockManager' => __DIR__ . 
'/includes/libs/lockmanager/MemcLockManager.php',
'MemcachedBagOStuff' => __DIR__ . 
'/includes/libs/objectcache/MemcachedBagOStuff.php',
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index ea0ec15..84fc959 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -9,7 +9,7 @@
 use GenderCache;
 use GlobalVarConfig;
 use Hooks;
-use MediawikiStatsdDataFactory;
+use IBufferingStatsdDataFactory;
 use Wikimedia\Rdbms\LBFactory;
 use LinkCache;
 use Wikimedia\Rdbms\LoadBalancer;
@@ -447,7 +447,7 @@
 
/**
 * @since 1.27
-* @return MediawikiStatsdDataFactory
+* @return IBufferingStatsdDataFactory
 */
public function getStatsdDataFactory() {
return $this->getService( 'StatsdDataFactory' );
diff --git a/includes/context/ContextSource.php 
b/includes/context/ContextSource.php
index 36d6df2..434201a 100644
--- a/includes/context/ContextSource.php
+++ b/includes/context/ContextSource.php
@@ -170,7 +170,7 @@
 * @deprecated since 1.27 use a StatsdDataFactory from 
MediaWikiServices (preferably injected)
 *
 * @since 1.25
-* @return MediawikiStatsdDataFactory
+* @return IBufferingStatsdDataFactory
 */
public function getStats() {
return MediaWikiServices::getInstance()->getStatsdDataFactory();
diff --git a/includes/context/DerivativeContext.php 
b/includes/context/DerivativeContext.php
index 9c3c42a..0d0c149 100644
--- a/includes/context/DerivativeContext.php
+++ b/includes/context/DerivativeContext.php
@@ -109,7 +109,7 @@
 *
 * @deprecated since 1.27 use a StatsdDataFactory from 
MediaWikiServices (preferably injected)
 *
-* @return MediawikiStatsdDataFactory
+* @return IBufferingStatsdDataFactory
 */
public function getStats() {
return MediaWikiServices::getInstance()->getStatsdDataFactory();
diff --git a/includes/context/IContextSource.php 
b/includes/context/IContextSource.php
index d13e1a5..895e9e4 100644
--- a/includes/context/IContextSource.php
+++ b/includes/context/IContextSource.php
@@ -131,7 +131,7 @@
 * @deprecated since 1.27 use a StatsdDataFactory from 
MediaWikiServices (preferably injected)
 *
 * @since 1.25
-* @return MediawikiStatsdDataFactory
+*