1
0
Fork 0

Avoid some external process calls when creating the global composer instance, saves a few ms of initialization time

pull/4621/head
Jordi Boggiano 2015-11-21 02:42:41 +00:00
parent 1fca6be3bf
commit cb3d9527e1
1 changed files with 6 additions and 0 deletions

View File

@ -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);