diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-07-21 04:53:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-21 04:53:15 +0300 |
commit | 4251c618888744593fbf54f56dfcbc1482a1f935 (patch) | |
tree | a337db4675576f1890cc67eb5247d60e6cbff7f2 | |
parent | ef3e384b687d94f4f2612a5822b5b2ce05c296cf (diff) |
Update composer libraries, while enforcing the minimum php in composer.json (#10334)
* Enforce the Minimum PHP version in composer.json using "platform" feature
Added in https://github.com/composer/composer/commit/a57c51e8d78156612e49dec1c54d3184f260f144
It was found that this flag is very important to use to make sure the package we build and release will be compatible with this PHP version.
Otherwise, the minimum PHP version enforced would be the version where our build script runs, which could be PHP 5.5 or PHP 7 which would have caused serious issues.
* Update doctrine/cache, monolog,piwik/network, piwik/cache, piwik/php-tracker etc.
https://github.com/piwik/piwik/issues/10058
* Release checklist to check that composer.json is correctly defined
* Use latest travis scripts for https://github.com/piwik/travis-scripts/commit/30d7b16940058a3dcea37dd7e7ed7241090bf57a
* .travis.yml file is out of date, auto-updating .travis.yml file.
* Use latest travis scripts for https://github.com/piwik/travis-scripts/commit/63445cf4a53e6e115a31ecacd79327dc5bfb2494
* .travis.yml file is out of date, auto-updating .travis.yml file.
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | composer.json | 35 | ||||
-rw-r--r-- | composer.lock | 194 | ||||
-rw-r--r-- | tests/PHPUnit/Integration/ReleaseCheckListTest.php | 29 | ||||
m--------- | tests/travis | 0 |
5 files changed, 151 insertions, 111 deletions
diff --git a/.travis.yml b/.travis.yml index 4e71a918e1..cbd288daa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,8 +101,8 @@ install: # travis now complains about this failing 9 times out of 10, so removing it #- travis_retry composer self-update - - - '[ "$SKIP_COMPOSER_INSTALL" == "1" ] || travis_retry composer install' + - '[ "$SKIP_COMPOSER_INSTALL" == "1" ] || travis_retry composer install' + before_script: diff --git a/composer.json b/composer.json index e691f270b1..f92c15c833 100644 --- a/composer.json +++ b/composer.json @@ -18,21 +18,9 @@ "wiki": "https://github.com/piwik/piwik/wiki", "source": "https://github.com/piwik/piwik" }, - "autoload": { - "psr-4": { - "Piwik\\Plugins\\": "plugins/", - "Piwik\\": "core/" - }, - "psr-0": { - "Zend_": "libs/", - "HTML_": "libs/", - "PEAR_": "libs/", - "Archive_": "libs/" - } - }, - "autoload-dev": { - "psr-4": { - "Piwik\\Tests\\": "tests/PHPUnit/" + "config":{ + "platform": { + "php": "5.3.3" } }, "require": { @@ -107,5 +95,22 @@ "post-install-cmd": [ "Piwik\\Composer\\ScriptHandler::buildXhprof" ] + }, + "autoload": { + "psr-4": { + "Piwik\\Plugins\\": "plugins/", + "Piwik\\": "core/" + }, + "psr-0": { + "Zend_": "libs/", + "HTML_": "libs/", + "PEAR_": "libs/", + "Archive_": "libs/" + } + }, + "autoload-dev": { + "psr-4": { + "Piwik\\Tests\\": "tests/PHPUnit/" + } } } diff --git a/composer.lock b/composer.lock index 6a322faa68..f425e3edb3 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": "a51a1c88dd57ca43ed73ebc837c3c272", - "content-hash": "c9e1b12d01d2a5ff455b811e779fe1ae", + "hash": "e50915e8a908a57eb8111876fd084910", + "content-hash": "e83668fa3120ab4f766c150a82f01d9c", "packages": [ { "name": "container-interop/container-interop", @@ -104,16 +104,16 @@ }, { "name": "doctrine/cache", - "version": "v1.4.2", + "version": "v1.5.4", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca" + "reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/8c434000f420ade76a07c64cbe08ca47e5c101ca", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca", + "url": "https://api.github.com/repos/doctrine/cache/zipball/47cdc76ceb95cc591d9c79a36dc3794975b5d136", + "reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136", "shasum": "" }, "require": { @@ -134,8 +134,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } }, "notification-url": "https://packagist.org/downloads/", @@ -170,7 +170,7 @@ "cache", "caching" ], - "time": "2015-08-31 12:36:41" + "time": "2015-12-19 05:03:47" }, { "name": "doctrine/lexer", @@ -305,16 +305,16 @@ }, { "name": "monolog/monolog", - "version": "1.17.2", + "version": "1.20.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24" + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037", + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037", "shasum": "" }, "require": { @@ -329,13 +329,13 @@ "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "phpunit/phpunit": "~4.5", "phpunit/phpunit-mock-objects": "2.3.0", - "raven/raven": "^0.13", "ruflin/elastica": ">=0.90 <3.0", - "swiftmailer/swiftmailer": "~5.3", - "videlalvaro/php-amqplib": "~2.4" + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "~5.3" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -343,16 +343,17 @@ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", - "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" + "sentry/sentry": "Allow sending log messages to a Sentry server" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -378,7 +379,7 @@ "logging", "psr-3" ], - "time": "2015-10-14 12:51:02" + "time": "2016-07-02 14:02:10" }, { "name": "mustangostang/spyc", @@ -641,16 +642,16 @@ }, { "name": "php-di/invoker", - "version": "1.2.0", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "9949fff87fcf14e8f2ccfbe36dac1e5921944c48" + "reference": "1f4ca63b9abc66109e53b255e465d0ddb5c2e3f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/9949fff87fcf14e8f2ccfbe36dac1e5921944c48", - "reference": "9949fff87fcf14e8f2ccfbe36dac1e5921944c48", + "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/1f4ca63b9abc66109e53b255e465d0ddb5c2e3f7", + "reference": "1f4ca63b9abc66109e53b255e465d0ddb5c2e3f7", "shasum": "" }, "require": { @@ -680,7 +681,7 @@ "invoke", "invoker" ], - "time": "2015-10-22 19:49:23" + "time": "2016-07-14 13:09:58" }, { "name": "php-di/php-di", @@ -741,16 +742,16 @@ }, { "name": "piwik/cache", - "version": "0.2.6", + "version": "0.2.7", "source": { "type": "git", "url": "https://github.com/piwik/component-cache.git", - "reference": "b8f2d18069c77726862f67d0199896d13073a831" + "reference": "7343e8b32da72f6ed50161c9c3b43ef8f5577cd6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/piwik/component-cache/zipball/b8f2d18069c77726862f67d0199896d13073a831", - "reference": "b8f2d18069c77726862f67d0199896d13073a831", + "url": "https://api.github.com/repos/piwik/component-cache/zipball/7343e8b32da72f6ed50161c9c3b43ef8f5577cd6", + "reference": "7343e8b32da72f6ed50161c9c3b43ef8f5577cd6", "shasum": "" }, "require": { @@ -784,20 +785,20 @@ "file", "redis" ], - "time": "2015-09-29 16:50:32" + "time": "2016-07-20 23:26:18" }, { "name": "piwik/decompress", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/piwik/component-decompress.git", - "reference": "deca40d71d29d6140aad39db007aea82676b7631" + "reference": "aa0a13f0ff44f70c736a72dd19ae1bcf400c6932" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/piwik/component-decompress/zipball/deca40d71d29d6140aad39db007aea82676b7631", - "reference": "deca40d71d29d6140aad39db007aea82676b7631", + "url": "https://api.github.com/repos/piwik/component-decompress/zipball/aa0a13f0ff44f70c736a72dd19ae1bcf400c6932", + "reference": "aa0a13f0ff44f70c736a72dd19ae1bcf400c6932", "shasum": "" }, "require": { @@ -820,7 +821,7 @@ "license": [ "LGPL-3.0" ], - "time": "2015-09-22 10:58:19" + "time": "2016-07-19 04:13:01" }, { "name": "piwik/device-detector", @@ -940,16 +941,16 @@ }, { "name": "piwik/piwik-php-tracker", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/piwik/piwik-php-tracker.git", - "reference": "f026613f8137c014030c96a22491ede5f5f1676b" + "reference": "eb4df1e223d4b377d06785c9b5fb3723d16d4465" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/piwik/piwik-php-tracker/zipball/f026613f8137c014030c96a22491ede5f5f1676b", - "reference": "f026613f8137c014030c96a22491ede5f5f1676b", + "url": "https://api.github.com/repos/piwik/piwik-php-tracker/zipball/eb4df1e223d4b377d06785c9b5fb3723d16d4465", + "reference": "eb4df1e223d4b377d06785c9b5fb3723d16d4465", "shasum": "" }, "type": "library", @@ -976,7 +977,7 @@ "piwik", "tracker" ], - "time": "2016-01-12 21:44:22" + "time": "2016-07-13 05:26:45" }, { "name": "piwik/referrer-spam-blacklist", @@ -1062,7 +1063,7 @@ }, { "name": "symfony/console", - "version": "v2.6.11", + "version": "v2.6.13", "target-dir": "Symfony/Component/Console", "source": { "type": "git", @@ -1120,7 +1121,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.6.11", + "version": "v2.6.13", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", @@ -1179,7 +1180,7 @@ }, { "name": "symfony/monolog-bridge", - "version": "v2.6.11", + "version": "v2.6.13", "target-dir": "Symfony/Bridge/Monolog", "source": { "type": "git", @@ -1342,16 +1343,16 @@ }, { "name": "twig/twig", - "version": "v1.22.3", + "version": "v1.24.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "ebfc36b7e77b0c1175afe30459cf943010245540" + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ebfc36b7e77b0c1175afe30459cf943010245540", - "reference": "ebfc36b7e77b0c1175afe30459cf943010245540", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512", + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512", "shasum": "" }, "require": { @@ -1364,7 +1365,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.22-dev" + "dev-master": "1.24-dev" } }, "autoload": { @@ -1399,7 +1400,7 @@ "keywords": [ "templating" ], - "time": "2015-10-13 07:07:02" + "time": "2016-05-30 09:11:59" } ], "packages-dev": [ @@ -1798,30 +1799,32 @@ }, { "name": "phpspec/prophecy", - "version": "v1.5.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -1854,7 +1857,7 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2016-06-07 08:13:47" }, { "name": "phpunit/php-code-coverage", @@ -2008,21 +2011,24 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.7", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, "type": "library", "autoload": { "classmap": [ @@ -2045,7 +2051,7 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2016-05-12 18:03:57" }, { "name": "phpunit/php-token-stream", @@ -2290,28 +2296,28 @@ }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -2334,24 +2340,24 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", - "version": "1.3.2", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { @@ -2388,20 +2394,20 @@ "environment", "hhvm" ], - "time": "2015-08-03 06:14:51" + "time": "2016-05-17 03:18:57" }, { "name": "sebastian/exporter", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -2409,12 +2415,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -2454,7 +2461,7 @@ "export", "exporter" ], - "time": "2015-06-21 07:55:53" + "time": "2016-06-17 09:04:28" }, { "name": "sebastian/global-state", @@ -2509,16 +2516,16 @@ }, { "name": "sebastian/recursion-context", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -2558,7 +2565,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" + "time": "2015-11-11 19:50:13" }, { "name": "sebastian/version", @@ -2597,7 +2604,7 @@ }, { "name": "symfony/var-dumper", - "version": "v2.6.11", + "version": "v2.6.13", "target-dir": "Symfony/Component/VarDumper", "source": { "type": "git", @@ -2657,16 +2664,16 @@ }, { "name": "symfony/yaml", - "version": "v2.6.11", + "version": "v2.6.13", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", + "url": "https://github.com/symfony/yaml.git", "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", "shasum": "" }, @@ -2717,5 +2724,8 @@ "platform": { "php": ">=5.3.3" }, - "platform-dev": [] + "platform-dev": [], + "platform-overrides": { + "php": "5.3.3" + } } diff --git a/tests/PHPUnit/Integration/ReleaseCheckListTest.php b/tests/PHPUnit/Integration/ReleaseCheckListTest.php index 67187046e1..265f60c372 100644 --- a/tests/PHPUnit/Integration/ReleaseCheckListTest.php +++ b/tests/PHPUnit/Integration/ReleaseCheckListTest.php @@ -28,6 +28,8 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase { private $globalConfig; + const MINIMUM_PHP_VERSION = '5.3.3'; + public function setUp() { $iniReader = new IniReader(); @@ -36,6 +38,21 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase parent::setUp(); } + public function test_minimumPHPVersion_isEnforced() + { + global $piwik_minimumPHPVersion; + $this->assertEquals(self::MINIMUM_PHP_VERSION, $piwik_minimumPHPVersion, 'minimum PHP version global variable correctly defined'); + } + + public function test_minimumPhpVersion_isDefinedInComposerJson() + { + $composerJson = $this->getComposerJsonAsArray(); + $this->assertEquals(self::MINIMUM_PHP_VERSION, $composerJson['config']['platform']['php']); + + $expectedRequirePhp = '>=' . self::MINIMUM_PHP_VERSION; + $this->assertEquals($expectedRequirePhp, $composerJson['require']['php']); + } + public function test_icoFilesIconsShouldBeInPngFormat() { $files = Filesystem::globr(PIWIK_INCLUDE_PATH . '/plugins', '*.ico'); @@ -605,8 +622,7 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase */ private function getComposerRequireDevPackages() { - $composer = file_get_contents(PIWIK_INCLUDE_PATH . '/composer.json'); - $composerJson = json_decode($composer, $assoc = true); + $composerJson = $this->getComposerJsonAsArray(); $composerDependencyDevOnly = array_keys($composerJson["require-dev"]); return $composerDependencyDevOnly; } @@ -752,5 +768,14 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase return stripos($file, "/tests/") !== false; } + /** + * @return mixed + */ + private function getComposerJsonAsArray() + { + $composer = file_get_contents(PIWIK_INCLUDE_PATH . '/composer.json'); + $composerJson = json_decode($composer, $assoc = true); + return $composerJson; + } } diff --git a/tests/travis b/tests/travis -Subproject e6a2e9eba8e475ac47298b0676b14983043ddb8 +Subproject 63445cf4a53e6e115a31ecacd79327dc5bfb249 |