From 481bf6603df62c7a41c7e3abe6f0bc33a4ed8dbd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 9 Nov 2015 11:28:05 +0100 Subject: [PATCH 1/2] [ci] Add version tag in phpunit wrapper to trigger cache-reset on demand --- phpunit | 12 ++++++++++++ src/Symfony/Component/HttpKernel/phpunit.xml.dist | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/phpunit b/phpunit index 79810f626e..2c1cbbd933 100755 --- a/phpunit +++ b/phpunit @@ -1,6 +1,18 @@ #!/usr/bin/env php + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +// Please update when phpunit needs to be reinstalled with fresh deps: +// Cache-Id-Version: 2015-11-09 12:13 UTC + use Symfony\Component\Process\ProcessUtils; error_reporting(-1); diff --git a/src/Symfony/Component/HttpKernel/phpunit.xml.dist b/src/Symfony/Component/HttpKernel/phpunit.xml.dist index 7901a0b8b5..5b17270141 100644 --- a/src/Symfony/Component/HttpKernel/phpunit.xml.dist +++ b/src/Symfony/Component/HttpKernel/phpunit.xml.dist @@ -24,4 +24,14 @@ + + + + + + Symfony\Component\HttpFoundation + + + + From f93e0c23d1d9e34cc959ebed94366cc8f3056d64 Mon Sep 17 00:00:00 2001 From: Emil Andersson Date: Mon, 9 Nov 2015 10:45:21 +0100 Subject: [PATCH 2/2] [ci] Phpunit tests wont run if composer is installed in a wrapper --- phpunit | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/phpunit b/phpunit index 2c1cbbd933..6830e3a77a 100755 --- a/phpunit +++ b/phpunit @@ -22,19 +22,11 @@ require __DIR__.'/src/Symfony/Component/Process/ProcessUtils.php'; $PHPUNIT_VERSION = PHP_VERSION_ID >= 70000 ? '5.0' : '4.8'; $PHPUNIT_DIR = __DIR__.'/.phpunit'; $PHP = defined('PHP_BINARY') ? PHP_BINARY : 'php'; - -if (!file_exists($COMPOSER = __DIR__.'/composer.phar')) { - $COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? `where.exe composer.phar` : (`which composer.phar` ?: `which composer`)); - if (!file_exists($COMPOSER)) { - stream_copy_to_stream( - fopen('https://getcomposer.org/composer.phar', 'rb'), - fopen($COMPOSER = __DIR__.'/composer.phar', 'wb') - ); - } -} - $PHP = ProcessUtils::escapeArgument($PHP); -$COMPOSER = $PHP.' '.ProcessUtils::escapeArgument($COMPOSER); + +$COMPOSER = file_exists($COMPOSER = __DIR__.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? `where.exe composer.phar` : `which composer.phar`)) + ? $PHP.' '.ProcessUtils::escapeArgument($COMPOSER) + : 'composer'; if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__FILE__) !== @file_get_contents("$PHPUNIT_DIR/.md5")) { // Build a standalone phpunit without symfony/yaml