Skip to content

Commit

Permalink
fix: sanity check on loadResourceConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
joostfaassen committed Jan 3, 2020
1 parent 797f5e2 commit 945b331
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Loader/ResourceYamlLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public function loadResourceConfig(Graph $graph, array $config): void
$kind = $config['kind'];
$className = $graph->getTypeClass($kind);
$resource = $className::fromConfig($graph, $config);
if (!$resource) {
throw new RuntimeException("fromConfig did not return a resource");
}
$graph->addResource($resource);
}
}

0 comments on commit 945b331

Please sign in to comment.