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:
parent
d16b928baf
commit
527c711149
4 changed files with 7 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue