diff --git a/src/functions.php b/src/functions.php index 3ac1fa8..ea031a9 100644 --- a/src/functions.php +++ b/src/functions.php @@ -256,10 +256,10 @@ function makeVerticesAndEdges(Graph $graph, array $services, array $volumes, arr ); } - foreach ($definition['depends_on'] ?? [] as $dependency) { + foreach ($definition['depends_on'] ?? [] as $key => $dependency) { addRelation( $graph->getVertex($service), - addService($graph, $dependency), + addService($graph, is_array($dependency) ? $key : $dependency), 'depends_on' ); }