Skip to content

Commit

Permalink
Fix partial updates of packages
Browse files Browse the repository at this point in the history
  • Loading branch information
onspli authored Sep 26, 2024
1 parent 83b2a65 commit 28dd7bc
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/PackageSelection/PackageSelection.php
Original file line number Diff line number Diff line change
Expand Up @@ -916,17 +916,26 @@ private function filterRepositories(array $repositories): array
return array_filter(
$repositories,
function ($repository) {
if (!($repository instanceof ConfigurableRepositoryInterface)) {
return false;
}
if ($repository instanceof ConfigurableRepositoryInterface) {

$config = $repository->getRepoConfig();
$config = $repository->getRepoConfig();
if (!isset($config['url'])) {
return false;
}
return in_array($config['url'], $this->repositoriesFilter ?? [], true);

} else if ($repository instanceof ArrayRepository) {
$packages = $repository->getPackages();
foreach ($packages as $package) {
if (in_array($package->getSourceUrl(), $this->repositoriesFilter ?? [], true)) {
return true;
}
}

if (!isset($config['url'])) {
return false;
} else {
return false;
}

return in_array($config['url'], $this->repositoriesFilter ?? [], true);
}
);
}
Expand Down

0 comments on commit 28dd7bc

Please sign in to comment.