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:
parent
ca3b874414
commit
b0665981c2
6 changed files with 69 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue