File tree 1 file changed +6
-2
lines changed
src/Symfony/Bundle/FrameworkBundle/DependencyInjection
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1012,13 +1012,17 @@ private function addCacheSection(ArrayNodeDefinition $rootNode)
1012
1012
->prototype ('array ' )
1013
1013
->fixXmlConfig ('adapter ' )
1014
1014
->beforeNormalization ()
1015
- ->ifTrue (function ($ v ) { return ( isset ($ v ['adapters ' ]) || \is_array ($ v ['adapter ' ] ?? null )) && isset ($ v ['provider ' ] ); })
1016
- ->thenInvalid ('Pool cannot have a "provider" while "adapter" is set to a map ' )
1015
+ ->ifTrue (function ($ v ) { return isset ($ v ['provider ' ]) && (( \is_array ( $ v [ ' adapters ' ] ?? null ) && 1 < \count ( $ v [ ' adapters ' ])) || ( \is_array ($ v ['adapter ' ] ?? null ) && 1 < \count ($ v ['adapter ' ])) ); })
1016
+ ->thenInvalid ('Pool cannot have a "provider" while more than one adapter is defined. ' )
1017
1017
->end ()
1018
1018
->children ()
1019
1019
->arrayNode ('adapters ' )
1020
1020
->performNoDeepMerging ()
1021
1021
->info ('One or more adapters to chain for creating the pool, defaults to "cache.app". ' )
1022
+ ->beforeNormalization ()
1023
+ ->ifTrue (function ($ v ) { return !\is_array ($ v ); })
1024
+ ->thenInvalid ('Pool "adapters" must be a map ' )
1025
+ ->end ()
1022
1026
->beforeNormalization ()
1023
1027
->always ()->then (function ($ values ) {
1024
1028
if ([0 ] === array_keys ($ values ) && \is_array ($ values [0 ])) {
You can’t perform that action at this time.
0 commit comments