Skip to content

Commit

Permalink
Handle already-initialized components
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneBruines committed Sep 5, 2019
1 parent ab51e6b commit 4ee2757
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ServiceMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public function __construct(string $configPath)
}

foreach ($config['components'] ?? [] as $id => $component) {
if (!is_array($component)) {
$this->components[$id] = $component;
continue;
}

if (null !== $identityClass = $component['identityClass'] ?? null) {
$this->components[$id]['identityClass'] = $identityClass;
}
Expand Down

0 comments on commit 4ee2757

Please sign in to comment.