Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/254401

Change subject: Update liuggio/statsd-php-client to 1.0.18
......................................................................

Update liuggio/statsd-php-client to 1.0.18

Change-Id: I81a7d7da30374072c78c51d1a7fe8229cd70d42c
---
M composer.json
M composer.lock
M composer/installed.json
M liuggio/statsd-php-client/.travis.yml
M liuggio/statsd-php-client/README.md
M liuggio/statsd-php-client/composer.json
M liuggio/statsd-php-client/phpunit.xml
M 
liuggio/statsd-php-client/src/Liuggio/StatsdClient/Monolog/Formatter/StatsDFormatter.php
D liuggio/statsd-php-client/tests/bootstrap.php
9 files changed, 114 insertions(+), 112 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/01/254401/1

diff --git a/composer.json b/composer.json
index 3fc0099..7d72349 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,7 @@
                "cssjanus/cssjanus": "1.1.1",
                "firebase/php-jwt": "2.1.0",
                "kzykhys/pygments": "1.0",
-               "liuggio/statsd-php-client": "1.0.16",
+               "liuggio/statsd-php-client": "1.0.18",
                "mediawiki/at-ease": "1.1.0",
                "monolog/monolog": "1.17.2",
                "nmred/kafka-php": "0.1.4",
diff --git a/composer.lock b/composer.lock
index 665337b..0234dac 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
         "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "hash": "4d71995711dccfe3bd78fb41c50b7c1c",
-    "content-hash": "a06587e76bd08b7ed85a3bd69b27317a",
+    "hash": "6aaf4bea26fd1bb297b7e21cc46959a6",
+    "content-hash": "96e8bb80b2cde728a2cf5cfcac424aac",
     "packages": [
         {
             "name": "composer/semver",
@@ -180,23 +180,24 @@
         },
         {
             "name": "liuggio/statsd-php-client",
-            "version": "v1.0.16",
+            "version": "v1.0.18",
             "source": {
                 "type": "git",
                 "url": "https://github.com/liuggio/statsd-php-client.git";,
-                "reference": "a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920"
+                "reference": "c42e6d6687b7b2d7683186ec7f4f03351cc3dbca"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/liuggio/statsd-php-client/zipball/a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920";,
-                "reference": "a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920",
+                "url": 
"https://api.github.com/repos/liuggio/statsd-php-client/zipball/c42e6d6687b7b2d7683186ec7f4f03351cc3dbca";,
+                "reference": "c42e6d6687b7b2d7683186ec7f4f03351cc3dbca",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.2"
             },
             "require-dev": {
-                "monolog/monolog": ">=1.2.0"
+                "monolog/monolog": ">=1.2.0",
+                "phpunit/phpunit": "^4.7"
             },
             "suggest": {
                 "monolog/monolog": "Monolog, in order to do generate statistic 
from log >=1.2.0)"
@@ -225,7 +226,7 @@
                 "php",
                 "statsd"
             ],
-            "time": "2015-04-27 08:12:26"
+            "time": "2015-07-23 23:12:45"
         },
         {
             "name": "mediawiki/at-ease",
diff --git a/composer/installed.json b/composer/installed.json
index e82bafd..ed58e01 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -206,57 +206,6 @@
         "description": "A Thin Wrapper for the Python Pygments"
     },
     {
-        "name": "liuggio/statsd-php-client",
-        "version": "v1.0.16",
-        "version_normalized": "1.0.16.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/liuggio/statsd-php-client.git";,
-            "reference": "a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920"
-        },
-        "dist": {
-            "type": "zip",
-            "url": 
"https://api.github.com/repos/liuggio/statsd-php-client/zipball/a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920";,
-            "reference": "a84fbef1a7afbfafd0ca4f1ebae4935bd1a7d920",
-            "shasum": ""
-        },
-        "require": {
-            "php": ">=5.3.2"
-        },
-        "require-dev": {
-            "monolog/monolog": ">=1.2.0"
-        },
-        "suggest": {
-            "monolog/monolog": "Monolog, in order to do generate statistic 
from log >=1.2.0)"
-        },
-        "time": "2015-04-27 08:12:26",
-        "type": "library",
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "Liuggio": "src/"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/";,
-        "license": [
-            "MIT"
-        ],
-        "authors": [
-            {
-                "name": "Giulio De Donato",
-                "email": "[email protected]"
-            }
-        ],
-        "description": "Statsd (Object Oriented) client library for PHP",
-        "homepage": "https://github.com/liuggio/statsd-php-client/";,
-        "keywords": [
-            "etsy",
-            "monitoring",
-            "php",
-            "statsd"
-        ]
-    },
-    {
         "name": "wikimedia/wrappedstring",
         "version": "v2.0.0",
         "version_normalized": "2.0.0.0",
@@ -1314,5 +1263,57 @@
         ],
         "description": "Provides library of common widgets, layouts, and 
windows.",
         "homepage": "https://www.mediawiki.org/wiki/OOjs_UI";
+    },
+    {
+        "name": "liuggio/statsd-php-client",
+        "version": "v1.0.18",
+        "version_normalized": "1.0.18.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/liuggio/statsd-php-client.git";,
+            "reference": "c42e6d6687b7b2d7683186ec7f4f03351cc3dbca"
+        },
+        "dist": {
+            "type": "zip",
+            "url": 
"https://api.github.com/repos/liuggio/statsd-php-client/zipball/c42e6d6687b7b2d7683186ec7f4f03351cc3dbca";,
+            "reference": "c42e6d6687b7b2d7683186ec7f4f03351cc3dbca",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.2"
+        },
+        "require-dev": {
+            "monolog/monolog": ">=1.2.0",
+            "phpunit/phpunit": "^4.7"
+        },
+        "suggest": {
+            "monolog/monolog": "Monolog, in order to do generate statistic 
from log >=1.2.0)"
+        },
+        "time": "2015-07-23 23:12:45",
+        "type": "library",
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Liuggio": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/";,
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Giulio De Donato",
+                "email": "[email protected]"
+            }
+        ],
+        "description": "Statsd (Object Oriented) client library for PHP",
+        "homepage": "https://github.com/liuggio/statsd-php-client/";,
+        "keywords": [
+            "etsy",
+            "monitoring",
+            "php",
+            "statsd"
+        ]
     }
 ]
diff --git a/liuggio/statsd-php-client/.travis.yml 
b/liuggio/statsd-php-client/.travis.yml
index 37f8ab1..7153604 100644
--- a/liuggio/statsd-php-client/.travis.yml
+++ b/liuggio/statsd-php-client/.travis.yml
@@ -1,18 +1,22 @@
 language: php
 
-php:
-  - 5.3
-  - 5.4
-  - 5.5
-  - 5.6
-  - hhvm
+sudo: false
+
+matrix:
+    include:
+        - php: 5.3.3
+        - php: 5.3
+        - php: 5.3
+          env: deps=low
+        - php: 5.4
+        - php: 5.5
+        - php: 5.6
+        - php: 7
+        - php: hhvm
+    fast_finish: true
 
 before_script:
-  - wget -nc http://getcomposer.org/composer.phar
-  - php composer.phar install --dev
+  - if [ "$deps" == "low" ]; then composer update --prefer-source 
--prefer-lowest --prefer-stable; fi
+  - if [ "$deps" != "low" ]; then composer install --prefer-source; fi
 
-script: phpunit
-
-notifications:
-  email:
-    - [email protected]
+script: ./vendor/bin/phpunit
\ No newline at end of file
diff --git a/liuggio/statsd-php-client/README.md 
b/liuggio/statsd-php-client/README.md
index e7c6f67..7ee7a3a 100644
--- a/liuggio/statsd-php-client/README.md
+++ b/liuggio/statsd-php-client/README.md
@@ -1,16 +1,29 @@
 ## statsd-php-client
 
-Be careful, see the [Upgrading section](Readme.md#upgrade) for <= v1.0.4, 
there's a BC.
-
 [![Build 
Status](https://secure.travis-ci.org/liuggio/statsd-php-client.png)](http://travis-ci.org/liuggio/statsd-php-client)
 [![Latest Stable 
Version](https://poser.pugx.org/liuggio/statsd-php-client/v/stable.png)](https://packagist.org/packages/liuggio/statsd-php-client)
 [![Total 
Downloads](https://poser.pugx.org/liuggio/statsd-php-client/downloads.png)](https://packagist.org/packages/liuggio/statsd-php-client)
 
 `statsd-php-client` is an Open Source, and **Object Oriented** Client for 
**etsy/statsd** written in php
+ 
+### Install with composer
 
-- `StatsdDataFactory` creates the 
`Liuggio\StatsdClient\Entity\StatsdDataInterface` Objects
+```bash
+composer require liuggio/statsd-php-client
+```
 
-- `Sender` just sends data over the network (there are many sender)
+### Simple Usage
 
-- `StatsdClient` sends the created objects via the `Sender` to the server
+```php
+$statsd = new StatsdService();
+
+$service->timing('usageTime', 100);
+$service->increment('visitor');
+$service->decrement('click');
+$service->gauge('gaugor', 333);
+$service->set('uniques', 765);
+
+$service->flush();
+```
+
 
 ## Why use this library instead the 
[statsd/php-example](https://github.com/etsy/statsd/blob/master/examples/php-example.php)?
 
@@ -29,19 +42,7 @@
 - You do want to debug the packets, and using `SysLogSender` the packets will 
be logged in your `syslog` log (on debian-like distro: `tail -f 
/var/log/syslog`)
 
 
-## Example
-
-1. create the Sender
-
-2. create the Client
-
-3. create the Factory
-
-4. the Factory will help you to create data
-
-5. the Client will send the data
-
-### Standard Usage
+### Advanced Instantiation
 
 ```php
 use Liuggio\StatsdClient\StatsdClient,
@@ -59,10 +60,8 @@
 
 // create the metrics with the service
 $service->timing('usageTime', 100);
-$service->increment('visitor');
-$service->decrement('click');
-$service->gauge('gaugor', 333);
-$service->set('uniques', 765);
+
+//...
 
 // send the data to statsd
 $service->flush();
@@ -92,9 +91,6 @@
 ```
 
 the output will be:  `prefix.my_logger.INFO.My-logger:1|c" 36 Bytes`
-
-
-
 
 ## Short Theory
 
@@ -142,11 +138,6 @@
 phpunit --coverage-html reports
 ```
 
-## Upgrade
+## Core developers:
 
-BC from the v1.0.4 version, [see Sender and Client 
differences](https://github.com/liuggio/statsd-php-client/pull/5/files).
-
-
-## TODO
-
-example with monolog
+This project is actively mantained by David Moreau AKA @dav-m85 and @liuggio
diff --git a/liuggio/statsd-php-client/composer.json 
b/liuggio/statsd-php-client/composer.json
index b47e0fd..d190a74 100644
--- a/liuggio/statsd-php-client/composer.json
+++ b/liuggio/statsd-php-client/composer.json
@@ -17,8 +17,12 @@
     "autoload": {
         "psr-0": {"Liuggio": "src/"}
     },
+    "autoload-dev": {
+      "psr-0": {"Liuggio": "tests/"}
+    },
     "require-dev": {
-        "monolog/monolog": ">=1.2.0"
+        "monolog/monolog": ">=1.2.0",
+        "phpunit/phpunit": "^4.7"
     },
     "suggest": {
         "monolog/monolog": "Monolog, in order to do generate statistic from 
log >=1.2.0)"
diff --git a/liuggio/statsd-php-client/phpunit.xml 
b/liuggio/statsd-php-client/phpunit.xml
index 621efd7..9add0db 100644
--- a/liuggio/statsd-php-client/phpunit.xml
+++ b/liuggio/statsd-php-client/phpunit.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<phpunit bootstrap="tests/bootstrap.php" colors="true">
+<phpunit bootstrap="vendor/autoload.php" colors="true">
     <testsuites>
         <testsuite name="Statsd-Service Test Suite">
             <directory>tests/Liuggio/StatsdClient</directory>
diff --git 
a/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Monolog/Formatter/StatsDFormatter.php
 
b/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Monolog/Formatter/StatsDFormatter.php
index 6311112..d8f58c8 100644
--- 
a/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Monolog/Formatter/StatsDFormatter.php
+++ 
b/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Monolog/Formatter/StatsDFormatter.php
@@ -73,12 +73,18 @@
         // creating more rows for context content
         if ($this->logContext && isset($vars['context'])) {
             foreach ($vars['context'] as $key => $parameter) {
+                if (!is_string($parameter)) {
+                    $parameter = json_encode($parameter);
+                }
                 $output[] = sprintf("%s.context.%s.%s", $firstRow, $key, 
$parameter);
             }
         }
         // creating more rows for extra content
         if ($this->logExtra && isset($vars['extra'])) {
             foreach ($vars['extra'] as $key => $parameter) {
+                if (!is_string($parameter)) {
+                    $parameter = json_encode($parameter);
+                }
                 $output[] = sprintf("%s.extra.%s.%s", $firstRow, $key, 
$parameter);
             }
         }
diff --git a/liuggio/statsd-php-client/tests/bootstrap.php 
b/liuggio/statsd-php-client/tests/bootstrap.php
deleted file mode 100644
index 0594a46..0000000
--- a/liuggio/statsd-php-client/tests/bootstrap.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-
-$loader = require_once __DIR__ . "/../vendor/autoload.php";
-$loader->add('Liuggio\\', __DIR__);
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/254401
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81a7d7da30374072c78c51d1a7fe8229cd70d42c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to