Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
performance optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Heleniak committed Sep 1, 2012
1 parent 176c912 commit ef2f504
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rg/broker/commands/AddRepository.php
Expand Up @@ -71,9 +71,10 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$dumper = new \Composer\Package\Dumper\ArrayDumper();

$installedPackages = $this->getInstalledPackages($repositoryDir);
$localRepos = new \Composer\Repository\CompositeRepository($composer->getRepositoryManager()->getLocalRepositories());
foreach ($installedPackages as $installedPackage) {
/** @var \Composer\Package\PackageInterface $package */
$package = $composer->getRepositoryManager()->findPackage($installedPackage['name'], $installedPackage['version']);
$package = $localRepos->findPackage($installedPackage['name'], $installedPackage['version']);
$zipfileName = $this->createZipFile($repositoryDir, $package, $output, $processExecutor);
$packageArray = $this->getPackageArray($repositoryDir, $repositoryUrl, $dumper, $package, $zipfileName);
$packages['packages'][$package->getName()][$package->getVersion()] = $packageArray;
Expand Down

0 comments on commit ef2f504

Please sign in to comment.