fix: recursively merge default values

This commit is contained in:
Oliver Davies 2023-11-23 06:51:23 +00:00
parent afb630c93e
commit 8eb8a9d6e3
2 changed files with 2 additions and 1 deletions

View file

@ -9,6 +9,7 @@
### Fixed ### Fixed
* The `pre-push` Git hook should use `./run test:commit` instead of `just test-commit` since `just` is no longer used. * The `pre-push` Git hook should use `./run test:commit` instead of `just test-commit` since `just` is no longer used.
* Recursively merge `build.defaults.yaml` into the given configuration.
## 2023-11-22 ## 2023-11-22

View file

@ -10,7 +10,7 @@ use Symfony\Component\Yaml\Yaml;
final class CreateFinalConfigurationData final class CreateFinalConfigurationData
{ {
public function handle(string $configFile, \Closure $next) { public function handle(string $configFile, \Closure $next) {
$configurationData = array_merge( $configurationData = array_replace_recursive(
Yaml::parseFile(filename: __DIR__ . '/../../resources/build.defaults.yaml'), Yaml::parseFile(filename: __DIR__ . '/../../resources/build.defaults.yaml'),
Yaml::parseFile(filename: $configFile), Yaml::parseFile(filename: $configFile),
); );