8000 Allow simple-phpunit to be used with an HTTP proxy · symfony/symfony@921b646 · GitHub
[go: up one dir, main page]

Skip to content

Commit 921b646

Browse files
author
Thomas Royer
committed
Allow simple-phpunit to be used with an HTTP proxy
1 parent fef1546 commit 921b646

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
3737
if (file_exists("phpunit-$PHPUNIT_VERSION")) {
3838
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION"));
3939
}
40-
if (extension_loaded('openssl') && ini_get('allow_url_fopen')) {
40+
if (extension_loaded('openssl') && ini_get('allow_url_fopen') && !isset($_SERVER['http_proxy']) && !isset($_SERVER['https_proxy'])) {
4141
stream_copy_to_stream(fopen("https://github.com/sebastianbergmann/phpunit/archive/$PHPUNIT_VERSION.zip", 'rb'), fopen("$PHPUNIT_VERSION.zip", 'wb'));
4242
} else {
4343
@unlink("$PHPUNIT_VERSION.zip");

0 commit comments

Comments
 (0)
0