From 86c37ab880dd780e66984ff85ad50c2ec8a5fa0b Mon Sep 17 00:00:00 2001 From: Jan Gantzert Date: Thu, 10 Oct 2024 01:38:46 +0200 Subject: [PATCH] do not use package search for proxy repos --- src/Service/DistManager.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Service/DistManager.php b/src/Service/DistManager.php index 829201fa..5b544e30 100644 --- a/src/Service/DistManager.php +++ b/src/Service/DistManager.php @@ -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; @@ -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);