File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1012,13 +1012,14 @@ 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 ' ] ?? $ v [ ' adapter ' ] ?? null ) && 1 < \count ($ v ['adapters ' ] ?? $ 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 ()->castToArray ()->end ()
1022
1023
->beforeNormalization ()
1023
1024
->always ()->then (function ($ values ) {
1024
1025
if ([0 ] === array_keys ($ values ) && \is_array ($ values [0 ])) {
You can’t perform that action at this time.
0 commit comments