File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,12 @@ generate absolute URLs::
217
217
highly optimized URL matcher class that can replace the default
218
218
``UrlMatcher ``::
219
219
220
- $dumper = new Routing\Matcher\Dumper\PhpMatcherDumper($routes);
220
+ use Symfony\Component\Routing\Matcher\CompiledUrlMatcher;
221
+ use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper;
221
222
222
- echo $dumper->dump();
223
+ // $compiledRoutes is a plain PHP array that describes
224
+ // all routes using a performant data format
225
+ // you can and SHOULD cache it, typically by exporting it to a PHP file
226
+ $compiledRoutes = (new CompiledUrlMatcherDumper($routes))->getCompiledRoutes();
227
+
228
+ $matcher = new CompiledUrlMatcher($compiledRoutes, $context);
You can’t perform that action at this time.
0 commit comments