File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/Icons/src/DependencyInjection Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1212namespace Symfony \UX \Icons \DependencyInjection ;
1313
1414use Symfony \Component \AssetMapper \Event \PreAssetsCompileEvent ;
15+ use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
1516use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
1617use Symfony \Component \Config \Definition \ConfigurationInterface ;
1718use Symfony \Component \Config \FileLocator ;
@@ -63,7 +64,9 @@ public function getConfigTreeBuilder(): TreeBuilder
6364 ->info ('Override default icon attributes for icons in this set. ' )
6465 ->example (['class ' => 'icon icon-acme ' , 'fill ' => 'none ' ])
6566 ->normalizeKeys (false )
66- ->variablePrototype ()
67+ ->useAttributeAsKey ('key ' )
68+ ->{method_exists (ArrayNodeDefinition::class, 'stringPrototype ' ) ? 'stringPrototype ' : 'scalarPrototype ' }()
69+ ->cannotBeEmpty ()
6770 ->end ()
6871 ->end ()
6972 ->end ()
@@ -80,7 +83,8 @@ public function getConfigTreeBuilder(): TreeBuilder
8083 'privacy ' => 'bi:cookie ' ,
8184 ])
8285 ->normalizeKeys (false )
83- ->scalarPrototype ()
86+ ->useAttributeAsKey ('key ' )
87+ ->{method_exists (ArrayNodeDefinition::class, 'stringPrototype ' ) ? 'stringPrototype ' : 'scalarPrototype ' }()
8488 ->cannotBeEmpty ()
8589 ->end ()
8690 ->end ()
You can’t perform that action at this time.
0 commit comments