@@ -38,7 +38,11 @@ $COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rt
38
38
? $ PHP .' ' .escapeshellarg ($ COMPOSER )
39
39
: 'composer ' ;
40
40
41
- if (!file_exists ("$ PHPUNIT_DIR /phpunit- $ PHPUNIT_VERSION /phpunit " ) || md5_file (__FILE__ )."\n" .getenv ('SYMFONY_PHPUNIT_REMOVE ' ) !== @file_get_contents ("$ PHPUNIT_DIR /. $ PHPUNIT_VERSION .md5 " )) {
41
+ if (false === $ SYMFONY_PHPUNIT_REMOVE = getenv ('SYMFONY_PHPUNIT_REMOVE ' )) {
42
+ $ SYMFONY_PHPUNIT_REMOVE = 'phpspec/prophecy symfony/yaml ' ;
43
+ }
44
+
45
+ if (!file_exists ("$ PHPUNIT_DIR /phpunit- $ PHPUNIT_VERSION /phpunit " ) || md5_file (__FILE__ )."\n" .$ SYMFONY_PHPUNIT_REMOVE !== @file_get_contents ("$ PHPUNIT_DIR /. $ PHPUNIT_VERSION .md5 " )) {
42
46
// Build a standalone phpunit without symfony/yaml nor prophecy by default
43
47
44
48
@mkdir ($ PHPUNIT_DIR , 0777 , true );
@@ -60,8 +64,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
60
64
$ zip ->extractTo (getcwd ());
61
65
$ zip ->close ();
62
66
chdir ("phpunit- $ PHPUNIT_VERSION " );
63
- $ SYMFONY_PHPUNIT_REMOVE = getenv ('SYMFONY_PHPUNIT_REMOVE ' );
64
- passthru ("$ COMPOSER remove --no-update " .('' === $ SYMFONY_PHPUNIT_REMOVE ?: 'phpspec/prophecy symfony/yaml ' ));
67
+ passthru ("$ COMPOSER remove --no-update " .$ SYMFONY_PHPUNIT_REMOVE );
65
68
if (5.1 <= $ PHPUNIT_VERSION && $ PHPUNIT_VERSION < 5.4 ) {
66
69
passthru ("$ COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0 \"" );
67
70
}
@@ -83,7 +86,7 @@ Symfony\Bridge\PhpUnit\TextUI\Command::main();
83
86
EOPHP
84
87
);
85
88
chdir ('.. ' );
86
- file_put_contents (". $ PHPUNIT_VERSION .md5 " , md5_file (__FILE__ )."\n" .getenv ( ' SYMFONY_PHPUNIT_REMOVE ' ) );
89
+ file_put_contents (". $ PHPUNIT_VERSION .md5 " , md5_file (__FILE__ )."\n" .$ SYMFONY_PHPUNIT_REMOVE );
87
90
chdir ($ oldPwd );
88
91
89
92
}
0 commit comments