Avoid some external process calls when creating the global composer instance, saves a few ms of initialization time
parent
1fca6be3bf
commit
cb3d9527e1
|
@ -271,6 +271,12 @@ class Factory
|
||||||
// load local repository
|
// load local repository
|
||||||
$this->addLocalRepository($rm, $vendorDir);
|
$this->addLocalRepository($rm, $vendorDir);
|
||||||
|
|
||||||
|
// force-set the version of the global package if not defined as
|
||||||
|
// guessing it adds no value and only takes time
|
||||||
|
if (!$fullLoad && !isset($localConfig['version'])) {
|
||||||
|
$localConfig['version'] = '1.0.0';
|
||||||
|
}
|
||||||
|
|
||||||
// load package
|
// load package
|
||||||
$parser = new VersionParser;
|
$parser = new VersionParser;
|
||||||
$guesser = new VersionGuesser($config, new ProcessExecutor($io), $parser);
|
$guesser = new VersionGuesser($config, new ProcessExecutor($io), $parser);
|
||||||
|
|
Loading…
Reference in New Issue