From 038c671c331faeba974039093cc3cd36160282dd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 20 Nov 2017 20:24:15 +0100 Subject: [PATCH] [Bridge/PhpUnit] Sync the bridge version installed in vendor/ and in phpunit clone --- src/Symfony/Bridge/PhpUnit/bin/simple-phpunit | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit index f7e34e048b..3b78ac4f50 100755 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit @@ -68,7 +68,17 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) { passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\""); } - passthru("$COMPOSER require --no-update symfony/phpunit-bridge \"~3.4-beta5@dev|^4.0-beta5@dev\""); + passthru("$COMPOSER require --no-update symfony/phpunit-bridge \"*\""); + if (file_exists(($path = dirname(__DIR__)).'/composer.json')) { + if (file_exists($path.'/vendor/symfony/phpunit-bridge/composer.json')) { + $path .= '/vendor/symfony/phpunit-bridge'; + } + } elseif (file_exists($path.'/symfony/phpunit-bridge/composer.json')) { + $path .= '/symfony/phpunit-bridge'; + } + if (file_exists($path)) { + passthru("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg($path)); + } $prevRoot = getenv('COMPOSER_ROOT_VERSION'); putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99"); $exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true)));