stats: Hard-deprecate BufferingStatsdDataFactory::getBuffer()
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 15 Jun 2018 22:15:26 +0000 (23:15 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 15 Jun 2018 22:15:26 +0000 (23:15 +0100)
Follows-up 7fdc3d09a3b6. Also document the getData method.

This method seems unused from a quick glance at Code Search, but
there's a lot of false positives from Monolog instances.

To play safe, rather than removing, add hard-deprecation for
a few days just in case we find another hit.

Change-Id: I8aab93744e66c1a583c67f0bbac27a45250a8fbb

includes/libs/stats/BufferingStatsdDataFactory.php

index 06915b2..5ef0135 100644 (file)
@@ -92,10 +92,11 @@ class BufferingStatsdDataFactory extends StatsdDataFactory implements IBuffering
        }
 
        /**
-        * @deprecated Use getData()
+        * @deprecated since 1.30 Use getData() instead
         * @return StatsdData[]
         */
        public function getBuffer() {
+               wfDeprecated( __METHOD__, '1.30' );
                return $this->buffer;
        }
 
@@ -103,6 +104,10 @@ class BufferingStatsdDataFactory extends StatsdDataFactory implements IBuffering
                return !empty( $this->buffer );
        }
 
+       /**
+        * @since 1.30
+        * @return StatsdData[]
+        */
        public function getData() {
                return $this->buffer;
        }