|
11 | 11 | */
|
12 | 12 |
|
13 | 13 | // Please update when phpunit needs to be reinstalled with fresh deps:
|
14 |
| -// Cache-Id-Version: 2017-11-22 09:30 UTC |
| 14 | +// Cache-Id-Version: 2018-11-20 15:30 UTC |
15 | 15 |
|
16 | 16 | error_reporting(-1);
|
17 | 17 |
|
@@ -60,29 +60,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
|
60 | 60 |
|
61 | 61 | @mkdir($PHPUNIT_DIR, 0777, true);
|
62 | 62 | chdir($PHPUNIT_DIR);
|
63 |
| - if (file_exists("phpunit-$PHPUNIT_VERSION")) { |
64 |
| - passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION")); |
65 |
| - } |
66 |
| - if (extension_loaded('openssl') && filter_var(ini_get('allow_url_fopen'), FILTER_VALIDATE_BOOLEAN) && !isset($_SERVER['http_proxy']) && !isset($_SERVER['https_proxy'])) { |
67 |
| - $remoteZip = "https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip"; |
68 |
| - $remoteZipStream = @fopen($remoteZip, 'rb'); |
69 |
| - if (!$remoteZipStream) { |
70 |
| - throw new \RuntimeException("Could not find $remoteZip"); |
71 |
| - } |
72 |
| - stream_copy_to_stream($remoteZipStream, fopen("$PHPUNIT_VERSION.zip", 'wb')); |
73 |
| - } elseif ('\\' === DIRECTORY_SEPARATOR) { |
74 |
| - passthru("certutil -urlcache -split -f \"https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip\" $PHPUNIT_VERSION.zip"); |
75 |
| - } else { |
76 |
| - @unlink("$PHPUNIT_VERSION.zip"); |
77 |
| - passthru("wget -q https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip"); |
78 |
| - } |
79 |
| - if (!class_exists('ZipArchive')) { |
80 |
| - throw new \Exception('simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages.'); |
81 |
| - } |
82 |
| - $zip = new ZipArchive(); |
83 |
| - $zip->open("$PHPUNIT_VERSION.zip"); |
84 |
| - $zip->extractTo(getcwd()); |
85 |
| - $zip->close(); |
| 63 | + passthru("$COMPOSER create-project --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\""); |
86 | 64 | chdir("phpunit-$PHPUNIT_VERSION");
|
87 | 65 | if ($SYMFONY_PHPUNIT_REMOVE) {
|
88 | 66 | passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE);
|
|
0 commit comments