From 519b25ea8e5dc5adeece3185c0a2622b3ab998b9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 4 Jun 2020 11:02:21 +0200 Subject: [PATCH 1/3] [PhpUnitBridge] fix undefined var on version 3.4 --- bin/simple-phpunit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/simple-phpunit b/bin/simple-phpunit index f0c7c408..3c68def2 100755 --- a/bin/simple-phpunit +++ b/bin/simple-phpunit @@ -107,9 +107,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ } if (1 === \count($info['versions'])) { - $passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi -s dev phpunit/phpunit $PHPUNIT_VERSION_DIR \"$PHPUNIT_VERSION.*\""); + $passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi -s dev phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\""); } else { - $passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi phpunit/phpunit $PHPUNIT_VERSION_DIR \"$PHPUNIT_VERSION.*\""); + $passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\""); } @copy("phpunit-$PHPUNIT_VERSION/phpunit.xsd", 'phpunit.xsd'); From 16b5230bb3d418d74c1d22dc948fb17662a8abc4 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 4 Jun 2020 12:27:56 +0200 Subject: [PATCH 2/3] [PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed --- bin/simple-phpunit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/simple-phpunit b/bin/simple-phpunit index 3c68def2..8951dbde 100755 --- a/bin/simple-phpunit +++ b/bin/simple-phpunit @@ -106,6 +106,11 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ } } + $info += [ + 'versions' => [], + 'requires' => ['php' => '*'], + ]; + if (1 === \count($info['versions'])) { $passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi -s dev phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\""); } else { From ac355e1e9ebde4cf6ef5187f5cf4b43001f9a29f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 4 Jun 2020 17:35:46 +0200 Subject: [PATCH 3/3] [PhpUnitBridge] fix syntax on PHP 5.3 --- bin/simple-phpunit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/simple-phpunit b/bin/simple-phpunit index 8951dbde..eae4cc31 100755 --- a/bin/simple-phpunit +++ b/bin/simple-phpunit @@ -106,10 +106,10 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ } } - $info += [ - 'versions' => [], - 'requires' => ['php' => '*'], - ]; + $info += array( + 'versions' => array(), + 'requires' => array('php' => '*'), + ); if (1 === \count($info['versions'])) { $passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi -s dev phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");