1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Move loader creation to avoid creating it more than once, unified the way packages are loading across repository classes

This commit is contained in:
Fabien Potencier 2011-10-29 07:43:26 +02:00
parent d16b928baf
commit 527c711149
4 changed files with 7 additions and 17 deletions

View file

@ -47,8 +47,8 @@ class PackageRepository extends ArrayRepository
$this->config = array($this->config);
}
$loader = new ArrayLoader($this->repositoryManager);
foreach ($this->config as $package) {
$loader = new ArrayLoader($this->repositoryManager);
$package = $loader->load($package);
$this->addPackage($package);
}