Andreas Möller 6 роки тому
батько
коміт
ea333aa134
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      src/Composer/Config/JsonConfigSource.php

+ 4 - 0
src/Composer/Config/JsonConfigSource.php

@@ -193,6 +193,10 @@ class JsonConfigSource implements ConfigSourceInterface
     {
         $this->manipulateJson('removeSubNode', $type, $name, function (&$config, $type, $name) {
             unset($config[$type][$name]);
+
+            if (0 === count($config[$type])) {
+                unset($config[$type]);
+            }
         });
     }