diff --git a/src/Configuration.php b/src/Configuration.php index a10a057c..9b83cdd2 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -80,7 +80,7 @@ public function __construct($type, $path, $name = null, $configuration = null) $this->setType($type); $this->setPath($path); $this->setName($name); - $this->setConfiguration($configuration ?? []); + $this->setConfiguration($configuration); } public function getObjectVars(): array @@ -148,12 +148,10 @@ public function setType(string $type): void */ public function setConfiguration($configuration): void { - if (is_array($configuration)) { - $configuration = json_decode(json_encode($configuration), true); - } - if (empty($this->getName())) { + if ($configuration && empty($this->getName())) { $this->setName($configuration['configuration']['general']['name'] ?? null); } + $this->configuration = $configuration; }