diff --git a/CHANGELOG.md b/CHANGELOG.md index 76cfa25..456d0fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,3 +92,5 @@ $ /usr/bin/env php bin/console darvin:utils:translations:title-case - Move macros template to utils lib. - Move translations to utils lib. + +7.3.1: Simplify override configuration. diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index afd7304..4f249e8 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -104,8 +104,13 @@ private function buildOverrideNode(): ArrayNodeDefinition ->prototype('array')->useAttributeAsKey('subject') ->prototype('array') ->children() - ->arrayNode('entities')->prototype('scalar')->cannotBeEmpty()->end()->end() - ->arrayNode('templates')->prototype('scalar')->cannotBeEmpty(); + ->arrayNode('entities') + ->prototype('scalar')->cannotBeEmpty()->end() + ->beforeNormalization()->castToArray()->end() + ->end() + ->arrayNode('templates') + ->prototype('scalar')->cannotBeEmpty()->end() + ->beforeNormalization()->castToArray(); return $root; }