Skip to content

Commit fc0cb72

Browse files
committed
Fixed the preservation of extra top level keys
The logic was preserving extra keys added manually in the generated file but was not copying extra keys written in the dist file
1 parent 5729f97 commit fc0cb72

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ScriptHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ public static function buildParameters(Event $event)
8989

9090
// Preserve other top-level keys than `$parameterKey` in the file
9191
$actualValues[$parameterKey] = $actualParams;
92+
foreach ($expectedValues as $key => $setting) {
93+
if (!array_key_exists($key, $actualValues)) {
94+
$actualValues[$key] = $setting;
95+
}
96+
}
9297

9398
file_put_contents($realFile, "# This file is auto-generated during the composer install\n" . Yaml::dump($actualValues, 99));
9499
}

0 commit comments

Comments
 (0)