Skip to content

Commit

Permalink
Install metarecipes first
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 27, 2021
1 parent ddddba0 commit 4e99ecc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ public function fetchRecipes(array $operations): array
'symfony/flex' => null,
'symfony/framework-bundle' => null,
];
$packRecipes = [];
$metaRecipes = [];

foreach ($operations as $operation) {
if ($operation instanceof UpdateOperation) {
Expand Down Expand Up @@ -783,8 +783,8 @@ public function fetchRecipes(array $operations): array
}

if (isset($manifests[$name])) {
if ('symfony-pack' === $package->getType()) {
$packRecipes[$name] = new Recipe($package, $name, $job, $manifests[$name], $locks[$name] ?? []);
if ('metapackage' === $package->getType()) {
$metaRecipes[$name] = new Recipe($package, $name, $job, $manifests[$name], $locks[$name] ?? []);
} else {
$recipes[$name] = new Recipe($package, $name, $job, $manifests[$name], $locks[$name] ?? []);
}
Expand Down Expand Up @@ -813,7 +813,7 @@ public function fetchRecipes(array $operations): array
}
}

return array_merge($packRecipes, array_filter($recipes));
return array_merge($metaRecipes, array_filter($recipes));
}

public function truncatePackages(PrePoolCreateEvent $event)
Expand Down

0 comments on commit 4e99ecc

Please sign in to comment.