Skip to content

Commit dc98f11

Browse files
Merge branch '4.1'
* 4.1: fix cs fix cs fix cs SCA: consolidate non empty array checks across codebase [cs] correct invalid @param types [Bridge/PhpUnit] Use composer to download phpunit [DI] fix taking lazy services into account when dumping the container [Form] Fixed empty data for compound date interval [Cache] fix optimizing Psr6Cache for AdapterInterface pools deal with explicitly enabled workflow nodes
2 parents 4ca0264 + fdcc467 commit dc98f11

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

bin/simple-phpunit

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
// 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
1515

1616
error_reporting(-1);
1717

@@ -89,29 +89,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
8989

9090
@mkdir($PHPUNIT_DIR, 0777, true);
9191
chdir($PHPUNIT_DIR);
92-
if (file_exists("phpunit-$PHPUNIT_VERSION")) {
93-
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION"));
94-
}
95-
if (extension_loaded('openssl') && filter_var(ini_get('allow_url_fopen'), FILTER_VALIDATE_BOOLEAN) && !isset($_SERVER['http_proxy']) && !isset($_SERVER['https_proxy'])) {
96-
$remoteZip = "https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip";
97-
$remoteZipStream = @fopen($remoteZip, 'rb');
98-
if (!$remoteZipStream) {
99-
throw new \RuntimeException("Could not find $remoteZip");
100-
}
101-
stream_copy_to_stream($remoteZipStream, fopen("$PHPUNIT_VERSION.zip", 'wb'));
102-
} elseif ('\\' === DIRECTORY_SEPARATOR) {
103-
passthru("certutil -urlcache -split -f \"https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip\" $PHPUNIT_VERSION.zip");
104-
} else {
105-
@unlink("$PHPUNIT_VERSION.zip");
106-
passthru("wget -q https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip");
107-
}
108-
if (!class_exists('ZipArchive')) {
109-
throw new \Exception('simple-phpunit requires the "zip" PHP extension to be installed and enabled in order to uncompress the downloaded PHPUnit packages.');
110-
}
111-
$zip = new ZipArchive();
112-
$zip->open("$PHPUNIT_VERSION.zip");
113-
$zip->extractTo(getcwd());
114-
$zip->close();
92+
passthru("$COMPOSER create-project --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
11593
chdir("phpunit-$PHPUNIT_VERSION");
11694
if ($SYMFONY_PHPUNIT_REMOVE) {
11795
passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE);

0 commit comments

Comments
 (0)