From 03ea8fb3ec54285bdd63cdada015aa67aec1c6ee Mon Sep 17 00:00:00 2001
From: Matthieu Napoli <matthieu@mnapoli.fr>
Date: Mon, 2 Feb 2015 12:56:54 +1300
Subject: [PATCH] Updated composer and PHP-DI with latest changes

---
 composer.lock              | 196 +++++++++++++++++++++++++------------
 config/environment/cli.php |   4 +-
 config/global.php          |  20 ++--
 3 files changed, 143 insertions(+), 77 deletions(-)

diff --git a/composer.lock b/composer.lock
index 2b34d06512..184c208ac3 100644
--- a/composer.lock
+++ b/composer.lock
@@ -265,28 +265,29 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/mnapoli/PHP-DI.git",
-                "reference": "4676e15f7f014185864fd5f8f0b3cdbd678067d0"
+                "reference": "ee5145095555c4532220eab991bf7782e9a645c6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mnapoli/PHP-DI/zipball/4676e15f7f014185864fd5f8f0b3cdbd678067d0",
-                "reference": "4676e15f7f014185864fd5f8f0b3cdbd678067d0",
+                "url": "https://api.github.com/repos/mnapoli/PHP-DI/zipball/ee5145095555c4532220eab991bf7782e9a645c6",
+                "reference": "ee5145095555c4532220eab991bf7782e9a645c6",
                 "shasum": ""
             },
             "require": {
                 "container-interop/container-interop": "~1.0",
-                "doctrine/annotations": "1.*",
-                "doctrine/cache": "1.*",
+                "doctrine/annotations": "~1.2",
+                "doctrine/cache": "~1.0",
                 "mnapoli/phpdocreader": "~1.3",
-                "myclabs/php-enum": "1.*",
+                "myclabs/php-enum": "~1.1",
                 "php": ">=5.3.3"
             },
             "require-dev": {
-                "ocramius/proxy-manager": "~0.3",
-                "phpunit/phpunit": "~4.0"
+                "mnapoli/phpunit-easymock": "~0.1.1",
+                "ocramius/proxy-manager": "~0.5",
+                "phpunit/phpunit": "~4.4"
             },
             "suggest": {
-                "ocramius/proxy-manager": "Install it if you want to use lazy injection"
+                "ocramius/proxy-manager": "Install it if you want to use lazy injection (version ~0.5)"
             },
             "type": "library",
             "extra": {
@@ -313,7 +314,7 @@
                 "dependency injection",
                 "di"
             ],
-            "time": "2014-12-17 04:49:43"
+            "time": "2015-01-29 03:02:32"
         },
         {
             "name": "mnapoli/phpdocreader",
@@ -471,34 +472,47 @@
         },
         {
             "name": "myclabs/php-enum",
-            "version": "1.2.1",
+            "version": "1.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/myclabs/php-enum.git",
-                "reference": "b52c2f215f5b251693369309ea7f537f9d92ec5e"
+                "reference": "c0bcd731d26d53d3db280cca0af33b3cd99fbafe"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/php-enum/zipball/b52c2f215f5b251693369309ea7f537f9d92ec5e",
-                "reference": "b52c2f215f5b251693369309ea7f537f9d92ec5e",
+                "url": "https://api.github.com/repos/myclabs/php-enum/zipball/c0bcd731d26d53d3db280cca0af33b3cd99fbafe",
+                "reference": "c0bcd731d26d53d3db280cca0af33b3cd99fbafe",
                 "shasum": ""
             },
+            "require": {
+                "php": ">=5.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "4.*",
+                "squizlabs/php_codesniffer": "1.*"
+            },
             "type": "library",
             "autoload": {
-                "psr-0": {
-                    "MyCLabs": "src/"
+                "psr-4": {
+                    "MyCLabs\\Enum\\": "src/"
                 }
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
                 "MIT"
             ],
+            "authors": [
+                {
+                    "name": "PHP Enum contributors",
+                    "homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
+                }
+            ],
             "description": "PHP Enum implementation",
             "homepage": "http://github.com/myclabs/php-enum",
             "keywords": [
                 "enum"
             ],
-            "time": "2013-11-11 18:29:08"
+            "time": "2015-01-30 22:06:24"
         },
         {
             "name": "piwik/cache",
@@ -584,16 +598,16 @@
         },
         {
             "name": "piwik/device-detector",
-            "version": "2.8",
+            "version": "2.8.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/piwik/device-detector.git",
-                "reference": "228a3b3ea17b67305a972b4e00c25f0926d3e016"
+                "reference": "adf8f5b775273f9d2ffb6203ca04d629c9791019"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/piwik/device-detector/zipball/228a3b3ea17b67305a972b4e00c25f0926d3e016",
-                "reference": "228a3b3ea17b67305a972b4e00c25f0926d3e016",
+                "url": "https://api.github.com/repos/piwik/device-detector/zipball/adf8f5b775273f9d2ffb6203ca04d629c9791019",
+                "reference": "adf8f5b775273f9d2ffb6203ca04d629c9791019",
                 "shasum": ""
             },
             "require": {
@@ -627,7 +641,7 @@
                 "parser",
                 "useragent"
             ],
-            "time": "2015-01-01 16:13:46"
+            "time": "2015-01-09 20:24:08"
         },
         {
             "name": "piwik/ini",
@@ -947,16 +961,16 @@
         },
         {
             "name": "twig/twig",
-            "version": "v1.16.3",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/twigphp/Twig.git",
-                "reference": "6dc11a1e8ecfc30e2c68aaeb218148409d8e68af"
+                "reference": "4cf7464348e7f9893a93f7096a90b73722be99cf"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/twigphp/Twig/zipball/6dc11a1e8ecfc30e2c68aaeb218148409d8e68af",
-                "reference": "6dc11a1e8ecfc30e2c68aaeb218148409d8e68af",
+                "url": "https://api.github.com/repos/twigphp/Twig/zipball/4cf7464348e7f9893a93f7096a90b73722be99cf",
+                "reference": "4cf7464348e7f9893a93f7096a90b73722be99cf",
                 "shasum": ""
             },
             "require": {
@@ -965,7 +979,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.16-dev"
+                    "dev-master": "1.18-dev"
                 }
             },
             "autoload": {
@@ -1000,7 +1014,7 @@
             "keywords": [
                 "templating"
             ],
-            "time": "2014-12-25 19:58:19"
+            "time": "2015-01-25 17:32:08"
         }
     ],
     "packages-dev": [
@@ -1346,16 +1360,16 @@
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "2.0.14",
+            "version": "2.0.15",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "ca158276c1200cc27f5409a5e338486bc0b4fc94"
+                "reference": "34cc484af1ca149188d0d9e91412191e398e0b67"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca158276c1200cc27f5409a5e338486bc0b4fc94",
-                "reference": "ca158276c1200cc27f5409a5e338486bc0b4fc94",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67",
+                "reference": "34cc484af1ca149188d0d9e91412191e398e0b67",
                 "shasum": ""
             },
             "require": {
@@ -1368,7 +1382,7 @@
             },
             "require-dev": {
                 "ext-xdebug": ">=2.1.4",
-                "phpunit/phpunit": "~4.1"
+                "phpunit/phpunit": "~4"
             },
             "suggest": {
                 "ext-dom": "*",
@@ -1387,9 +1401,6 @@
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                ""
-            ],
             "license": [
                 "BSD-3-Clause"
             ],
@@ -1407,7 +1418,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2014-12-26 13:28:33"
+            "time": "2015-01-24 10:06:35"
         },
         {
             "name": "phpunit/php-file-iterator",
@@ -1544,16 +1555,16 @@
         },
         {
             "name": "phpunit/php-token-stream",
-            "version": "1.3.0",
+            "version": "1.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-token-stream.git",
-                "reference": "f8d5d08c56de5cfd592b3340424a81733259a876"
+                "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876",
-                "reference": "f8d5d08c56de5cfd592b3340424a81733259a876",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74",
+                "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74",
                 "shasum": ""
             },
             "require": {
@@ -1566,7 +1577,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.3-dev"
+                    "dev-master": "1.4-dev"
                 }
             },
             "autoload": {
@@ -1589,20 +1600,20 @@
             "keywords": [
                 "tokenizer"
             ],
-            "time": "2014-08-31 06:12:13"
+            "time": "2015-01-17 09:51:32"
         },
         {
             "name": "phpunit/phpunit",
-            "version": "4.4.1",
+            "version": "4.4.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "6a5e49a86ce5e33b8d0657abe145057fc513543a"
+                "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6a5e49a86ce5e33b8d0657abe145057fc513543a",
-                "reference": "6a5e49a86ce5e33b8d0657abe145057fc513543a",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2e8580deebb7d1ac92ac878595e6bffe01069c2a",
+                "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a",
                 "shasum": ""
             },
             "require": {
@@ -1620,8 +1631,9 @@
                 "sebastian/comparator": "~1.0",
                 "sebastian/diff": "~1.1",
                 "sebastian/environment": "~1.1",
-                "sebastian/exporter": "~1.0",
+                "sebastian/exporter": "~1.1",
                 "sebastian/global-state": "~1.0",
+                "sebastian/recursion-context": "~1.0",
                 "sebastian/version": "~1.0",
                 "symfony/yaml": "~2.0"
             },
@@ -1660,7 +1672,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2014-12-28 07:57:05"
+            "time": "2015-01-27 16:06:15"
         },
         {
             "name": "phpunit/phpunit-mock-objects",
@@ -1719,25 +1731,25 @@
         },
         {
             "name": "sebastian/comparator",
-            "version": "1.1.0",
+            "version": "1.1.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/comparator.git",
-                "reference": "c484a80f97573ab934e37826dba0135a3301b26a"
+                "reference": "1dd8869519a225f7f2b9eb663e225298fade819e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c484a80f97573ab934e37826dba0135a3301b26a",
-                "reference": "c484a80f97573ab934e37826dba0135a3301b26a",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e",
+                "reference": "1dd8869519a225f7f2b9eb663e225298fade819e",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3",
-                "sebastian/diff": "~1.1",
-                "sebastian/exporter": "~1.0"
+                "sebastian/diff": "~1.2",
+                "sebastian/exporter": "~1.2"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.1"
+                "phpunit/phpunit": "~4.4"
             },
             "type": "library",
             "extra": {
@@ -1779,7 +1791,7 @@
                 "compare",
                 "equality"
             ],
-            "time": "2014-11-16 21:32:38"
+            "time": "2015-01-29 16:28:08"
         },
         {
             "name": "sebastian/diff",
@@ -1885,28 +1897,29 @@
         },
         {
             "name": "sebastian/exporter",
-            "version": "1.0.2",
+            "version": "1.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0"
+                "reference": "84839970d05254c73cde183a721c7af13aede943"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0",
-                "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943",
+                "reference": "84839970d05254c73cde183a721c7af13aede943",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.3"
+                "php": ">=5.3.3",
+                "sebastian/recursion-context": "~1.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.0"
+                "phpunit/phpunit": "~4.4"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.0.x-dev"
+                    "dev-master": "1.2.x-dev"
                 }
             },
             "autoload": {
@@ -1946,7 +1959,7 @@
                 "export",
                 "exporter"
             ],
-            "time": "2014-09-10 00:51:36"
+            "time": "2015-01-27 07:23:06"
         },
         {
             "name": "sebastian/global-state",
@@ -1999,6 +2012,59 @@
             ],
             "time": "2014-10-06 09:23:50"
         },
+        {
+            "name": "sebastian/recursion-context",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/recursion-context.git",
+                "reference": "3989662bbb30a29d20d9faa04a846af79b276252"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252",
+                "reference": "3989662bbb30a29d20d9faa04a846af79b276252",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides functionality to recursively process PHP variables",
+            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+            "time": "2015-01-24 09:48:32"
+        },
         {
             "name": "sebastian/version",
             "version": "1.0.4",
diff --git a/config/environment/cli.php b/config/environment/cli.php
index f924c31b20..2852c01007 100644
--- a/config/environment/cli.php
+++ b/config/environment/cli.php
@@ -12,7 +12,7 @@ return array(
     'log.handlers' => array(
         DI\link('Symfony\Bridge\Monolog\Handler\ConsoleHandler'),
     ),
-    'Symfony\Bridge\Monolog\Handler\ConsoleHandler' => DI\factory(function (ContainerInterface $c) {
+    'Symfony\Bridge\Monolog\Handler\ConsoleHandler' => function (ContainerInterface $c) {
         // Override the default verbosity map to make it more verbose by default
         $verbosityMap = array(
             OutputInterface::VERBOSITY_NORMAL => Logger::INFO,
@@ -23,7 +23,7 @@ return array(
         $handler = new ConsoleHandler(null, true, $verbosityMap);
         $handler->setFormatter(new ConsoleFormatter($c->get('log.console.format'), null, true, true));
         return $handler;
-    }),
+    },
     'log.console.format' => '%start_tag%%level_name% %extra.class%[%datetime%]%end_tag% %message%' . PHP_EOL,
 
 );
diff --git a/config/global.php b/config/global.php
index b8daf48d7f..d3d5ac39f6 100644
--- a/config/global.php
+++ b/config/global.php
@@ -10,7 +10,7 @@ return array(
 
     'path.root' => PIWIK_USER_PATH,
 
-    'path.tmp' => DI\factory(function (ContainerInterface $c) {
+    'path.tmp' => function (ContainerInterface $c) {
         $root = $c->get('path.root');
 
         // TODO remove that special case and instead have plugins override 'path.tmp' to add the instance id
@@ -22,15 +22,15 @@ return array(
         }
 
         return $root . '/tmp' . $instanceId;
-    }),
+    },
 
-    'path.cache' => DI\factory(function (ContainerInterface $c) {
+    'path.cache' => function (ContainerInterface $c) {
         $root = $c->get('path.tmp');
 
         return $root . '/cache/tracker/';
-    }),
+    },
 
-    'cache.backend' => DI\factory(function (ContainerInterface $c) {
+    'cache.backend' => function (ContainerInterface $c) {
         if (defined('PIWIK_TEST_MODE') && PIWIK_TEST_MODE) { // todo replace this with isTest() instead of isCli()
             $backend = 'file';
         } elseif (\Piwik\Development::isEnabled()) {
@@ -40,10 +40,10 @@ return array(
         }
 
         return $backend;
-    }),
+    },
     'Piwik\Cache\Lazy' => DI\object(),
     'Piwik\Cache\Transient' => DI\object(),
-    'Piwik\Cache\Eager' => DI\factory(function (ContainerInterface $c) {
+    'Piwik\Cache\Eager' => function (ContainerInterface $c) {
 
         $backend = $c->get('Piwik\Cache\Backend');
 
@@ -67,14 +67,14 @@ return array(
         });
 
         return $cache;
-    }),
-    'Piwik\Cache\Backend' => DI\factory(function (ContainerInterface $c) {
+    },
+    'Piwik\Cache\Backend' => function (ContainerInterface $c) {
 
         $type    = $c->get('cache.backend');
         $backend = \Piwik\Cache::buildBackend($type);
 
         return $backend;
-    }),
+    },
 
     // Log
     'Psr\Log\LoggerInterface' => DI\object('Monolog\Logger')
-- 
GitLab