File tree 1 file changed +13
-0
lines changed
Filter options
src/Symfony/Component/Routing
1 file changed +13
-0
lines changed
Original file line number Diff line number Diff line change @@ -162,6 +162,19 @@ public function setOptions(array $options)
162
162
if ($ invalid ) {
163
163
throw new \InvalidArgumentException (sprintf ('The Router does not support the following options: "%s". ' , implode ('", " ' , $ invalid )));
164
164
}
165
+
166
+ // This prevent a BC break introduced in 4.3.0
167
+ // Fallback to PhpGeneratorDumper if the UrlGenerator and UrlGeneratorDumper are not consistent with each other
168
+ if (is_a ($ this ->options ['generator_class ' ], CompiledUrlGenerator::class, true ) !==
169
+ is_a ($ this ->options ['generator_dumper_class ' ], CompiledUrlGeneratorDumper::class, true )) {
170
+ $ this ->options ['generator_dumper_class ' ] = 'Symfony \\Component \\Routing \\Generator \\Dumper \\PhpGeneratorDumper ' ;
171
+ }
172
+
173
+ // Fallback to PhpGeneratorDumper if the UrlMatcher and UrlMatcherDumper are not consistent with each other
174
+ if (is_a ($ this ->options ['matcher_class ' ], CompiledUrlMatcher::class, true ) !==
175
+ is_a ($ this ->options ['matcher_dumper_class ' ], CompiledUrlMatcherDumper::class, true )) {
176
+ $ this ->options ['matcher_dumper_class ' ] = 'Symfony \\Component \\Routing \\Matcher \\Dumper \\PhpMatcherDumper ' ;
177
+ }
165
178
}
166
179
167
180
/**
You can’t perform that action at this time.
0 commit comments