1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Parallellize the branch comparisons to speed up bootstrapping/version guessing when on a feature branch (#10632)

* Parallellize the branch comparisons to speed up bootstrapping/version guessing when on a feature branch, fixes #10568

* Allow ProcessExecutorMock to function with async calls
This commit is contained in:
Jordi Boggiano 2022-03-17 14:52:14 +01:00 committed by GitHub
parent ca3b874414
commit b0665981c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 69 additions and 18 deletions

View file

@ -20,6 +20,7 @@ use Composer\Package\RootPackage;
use Composer\Package\Version\VersionGuesser;
use Composer\Semver\VersionParser;
use Composer\Test\TestCase;
use Composer\Util\ProcessExecutor;
class RootPackageLoaderTest extends TestCase
{
@ -36,8 +37,11 @@ class RootPackageLoaderTest extends TestCase
$config = new Config;
$config->merge(array('repositories' => array('packagist' => false)));
$processExecutor = new ProcessExecutor();
$processExecutor->enableAsync();
$guesser = new VersionGuesser($config, $processExecutor, new VersionParser());
$loader = new RootPackageLoader($manager, $config);
$loader = new RootPackageLoader($manager, $config, null, $guesser);
return $loader->load($data);
}