File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -78,23 +78,9 @@ public function getConfigTreeBuilder()
78
78
->addDefaultsIfNotSet ()
79
79
->canBeEnabled ()
80
80
->fixXmlConfig ('route_basepath ' )
81
- ->beforeNormalization ()
82
- ->ifTrue (function ($ v ) {
83
- return isset ($ v ['route_basepath ' ]);
84
- })
85
- ->then (function ($ v ) {
86
- $ base = isset ($ v ['route_basepaths ' ]) ? $ v ['route_basepaths ' ] : array ();
87
- if (is_array ($ v ['route_basepath ' ])) {
88
- // xml configuration
89
- $ base += $ v ['route_basepath ' ];
90
- } else {
91
- $ base [] = $ v ['route_basepath ' ];
92
- }
93
- $ v ['route_basepaths ' ] = array_unique ($ base );
94
- unset($ v ['route_basepath ' ]);
95
-
96
- return $ v ;
97
- })
81
+ ->validate ()
82
+ ->ifTrue (function ($ v ) { isset ($ v ['route_basepath ' ]) && isset ($ v ['route_basepaths ' ]); })
83
+ ->thenInvalid ('Found values for both "route_basepath" and "route_basepaths", use "route_basepaths" instead. ' )
98
84
->end ()
99
85
->children ()
100
86
->scalarNode ('manager_name ' )->defaultNull ()->end ()
Original file line number Diff line number Diff line change 81
81
82
82
<xsd : attribute name =" enabled" type =" xsd:boolean" />
83
83
<xsd : attribute name =" manager-name" type =" xsd:string" />
84
+ <!-- the route-basepath is for BC only. you should use the route-basepath children elements -->
84
85
<xsd : attribute name =" route-basepath" type =" xsd:string" />
85
86
<xsd : attribute name =" content-basepath" type =" xsd:string" />
86
87
<xsd : attribute name =" use-sonata-admin" type =" enable_auto" />
You can’t perform that action at this time.
0 commit comments