Skip to content

Commit

Permalink
do not use package search for proxy repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Gantzert committed Oct 9, 2024
1 parent 187e72f commit 86c37ab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Service/DistManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Doctrine\Persistence\ManagerRegistry;
use League\Flysystem\FilesystemOperator;
use Packeton\Composer\PackagistFactory;
use Packeton\Composer\Repository\ComposerProxyRepository;
use Packeton\Composer\Repository\PacketonRepositoryInterface;
use Packeton\Entity\Package;
use Packeton\Entity\Version;
Expand Down Expand Up @@ -182,8 +183,11 @@ private function downloadArtifact(string $reference, Package $package): ?string
}

$repository = $this->createRepositoryAndIo($package);
$packages = $repository->getPackages();
$found = array_filter($packages, static fn($p) => $reference === $p->getDistReference());

if (!$repository instanceof ComposerProxyRepository) {
$packages = $repository->getPackages();
$found = array_filter($packages, static fn($p) => $reference === $p->getDistReference());
}

if ($package->getRepoType() === RepTypes::PROXY) {
return $this->composerProxyPackageManager->buildArchive($package, $repository, $reference);
Expand Down

0 comments on commit 86c37ab

Please sign in to comment.