Skip to content

Commit

Permalink
fix: finding dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek committed Oct 31, 2023
1 parent 29685ba commit 3eac130
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Repository/DefaultUnleashRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,17 @@ private function parseDependencies(array $dependenciesRaw, array $features, arra
$dependencies = [];

foreach ($dependenciesRaw as $dependency) {
$dependencyExists = $features[$dependency['feature']] ?? null;
$dependencyExists = false;
foreach ($features as $feature) {
if (
is_array($feature) &&
array_key_exists('name', $feature) &&
$feature['name'] === $dependency['feature']
) {
$dependencyExists = true;
break;
}
}

$dependencies[] = new DefaultDepencency(
$dependencyExists ? $this->parseFeature(
Expand Down

0 comments on commit 3eac130

Please sign in to comment.