@@ -24,12 +24,12 @@ Next, create an ``index.php`` file that defines the kernel class and executes it
24
24
25
25
// index.php
26
26
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
27
+ use Symfony\Bundle\FrameworkBundle\Routing\Loader\Configurator\RoutingConfigurator;
27
28
use Symfony\Component\Config\Loader\LoaderInterface;
28
29
use Symfony\Component\DependencyInjection\ContainerBuilder;
29
30
use Symfony\Component\HttpFoundation\JsonResponse;
30
31
use Symfony\Component\HttpFoundation\Request;
31
32
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
32
- use Symfony\Component\Routing\RouteCollectionBuilder;
33
33
34
34
require __DIR__.'/vendor/autoload.php';
35
35
@@ -52,7 +52,7 @@ Next, create an ``index.php`` file that defines the kernel class and executes it
52
52
]);
53
53
}
54
54
55
- protected function configureRoutes(RouteCollectionBuilder $routes)
55
+ protected function configureRoutes(RoutingConfigurator $routes)
56
56
{
57
57
// kernel is a service that points to this class
58
58
// optional 3rd argument is the route name
@@ -97,9 +97,9 @@ that define your bundles, your services and your routes:
97
97
of what you see in a normal ``config/packages/* `` file). You can also register
98
98
services directly in PHP or load external configuration files (shown below).
99
99
100
- **configureRoutes(RouteCollectionBuilder $routes) **
100
+ **configureRoutes(RoutingConfigurator $routes) **
101
101
Your job in this method is to add routes to the application. The
102
- ``RouteCollectionBuilder `` has methods that make adding routes in PHP more
102
+ ``RoutingConfigurator `` has methods that make adding routes in PHP more
103
103
fun. You can also load external routing files (shown below).
104
104
105
105
Advanced Example: Twig, Annotations and the Web Debug Toolbar
@@ -134,10 +134,10 @@ hold the kernel. Now it looks like this::
134
134
namespace App;
135
135
136
136
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
137
+ use Symfony\Bundle\FrameworkBundle\Routing\Loader\Configurator\RoutingConfigurator;
137
138
use Symfony\Component\Config\Loader\LoaderInterface;
138
139
use Symfony\Component\DependencyInjection\ContainerBuilder;
139
140
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
140
- use Symfony\Component\Routing\RouteCollectionBuilder;
141
141
142
142
class Kernel extends BaseKernel
143
143
{
@@ -170,7 +170,7 @@ hold the kernel. Now it looks like this::
170
170
}
171
171
}
172
172
173
- protected function configureRoutes(RouteCollectionBuilder $routes)
173
+ protected function configureRoutes(RoutingConfigurator $routes)
174
174
{
175
175
// import the WebProfilerRoutes, only if the bundle is enabled
176
176
if (isset($this->bundles['WebProfilerBundle'])) {
0 commit comments