You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor symfony#11085 Fixed route examples (Jules Pietri)
This PR was squashed before being merged into the 4.2 branch (closessymfony#11085).
Discussion
----------
Fixed route examples
Fixes partially symfony#8462 and symfony#10762.
Commits
-------
21408cf Fixed route examples
If you use the :class:`Symfony\\Component\\Routing\\Loader\\PhpFileLoader` you
305
-
have to provide the name of a PHP file which returns a :class:`Symfony\\Component\\Routing\\RouteCollection`::
305
+
have to provide the name of a PHP file which returns a callable handling a :class:`Symfony\\Component\\Routing\\Loader\\Configurator\\RoutingConfigurator`.
306
+
This class allows to chain imports, collections or simple route definition calls::
306
307
307
308
// RouteProvider.php
308
-
use Symfony\Component\Routing\RouteCollection;
309
-
use Symfony\Component\Routing\Route;
310
-
311
-
$routes = new RouteCollection();
312
-
$routes->add(
313
-
'route_name',
314
-
new Route('/foo', ['_controller' => 'ExampleController'])
0 commit comments