File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,11 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
117117 'requires ' => array ('php ' => '* ' ),
118118 );
119119
120- if (1 === count ($ info ['versions ' ])) {
120+ $ stableVersions = array_filter ($ info ['versions ' ], function ($ v ) {
121+ return !preg_match ('/-dev$|^dev-/ ' , $ v );
122+ });
123+
124+ if (!$ stableVersions ) {
121125 $ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress -s dev phpunit/phpunit phpunit- $ PHPUNIT_VERSION \"$ PHPUNIT_VERSION .* \"" );
122126 } else {
123127 $ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress phpunit/phpunit phpunit- $ PHPUNIT_VERSION \"$ PHPUNIT_VERSION .* \"" );
You can’t perform that action at this time.
0 commit comments