From 199b95a7b2d30e98d55c39f28ce7fea8b55de245 Mon Sep 17 00:00:00 2001 From: Igor Nikolaev Date: Tue, 14 Jan 2020 15:52:18 +0300 Subject: [PATCH] Simplify override configuration. --- CHANGELOG.md | 2 ++ DependencyInjection/Configuration.php | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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; }