From 8eb8a9d6e3b1a1b8cd33e4fe0201c581eb221bab Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 23 Nov 2023 06:51:23 +0000 Subject: [PATCH] fix: recursively merge default values --- CHANGELOG.md | 1 + src/Action/CreateFinalConfigurationData.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c55110d..8bb413b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixed * 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 diff --git a/src/Action/CreateFinalConfigurationData.php b/src/Action/CreateFinalConfigurationData.php index 5d274b7..dd306d6 100644 --- a/src/Action/CreateFinalConfigurationData.php +++ b/src/Action/CreateFinalConfigurationData.php @@ -10,7 +10,7 @@ use Symfony\Component\Yaml\Yaml; final class CreateFinalConfigurationData { 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: $configFile), );