8000 minor #13394 Fix typehint of parameter for MicrokernelTrait::configur… · symfony/symfony-docs@f4f6ef6 · GitHub
[go: up one dir, main page]

Skip to content

Commit f4f6ef6

Browse files
committed
minor #13394 Fix typehint of parameter for MicrokernelTrait::configureRoutes() (jpjoao)
This PR was merged into the master branch. Discussion ---------- Fix typehint of parameter for MicrokernelTrait::configureRoutes() It is now `RoutingConfigurator` instead of `RouteCollectionBuilder` according to https://github.com/symfony/symfony/blob/master/UPGRADE-5.1.md#frameworkbundle Also... There is a typo on the type on the mentioned file. Should I make PR to it or is it generated automatically? Commits ------- 4b5f199 Typehint of parameter for MicrokernelTrait::configureRoutes() should be RoutingConfigurator instead of RouteCollectionBuilder according to https://github.com/symfony/symfony/blob/master/UPGRADE-5.1.md#frameworkbundle
2 parents 5d68e7b + 4b5f199 commit f4f6ef6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

configuration/micro_kernel_trait.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ Next, create an ``index.php`` file that defines the kernel class and executes it
2424

2525
// index.php
2626
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
27+
use Symfony\Bundle\FrameworkBundle\Routing\Loader\Configurator\RoutingConfigurator;
2728
use Symfony\Component\Config\Loader\LoaderInterface;
2829
use Symfony\Component\DependencyInjection\ContainerBuilder;
2930
use Symfony\Component\HttpFoundation\JsonResponse;
3031
use Symfony\Component\HttpFoundation\Request;
3132
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
32-
use Symfony\Component\Routing\RouteCollectionBuilder;
3333

3434
require __DIR__.'/vendor/autoload.php';
3535

@@ -52,7 +52,7 @@ Next, create an ``index.php`` file that defines the kernel class and executes it
5252
]);
5353
}
5454

55 8000 -
protected function configureRoutes(RouteCollectionBuilder $routes)
55+
protected function configureRoutes(RoutingConfigurator $routes)
5656
{
5757
// kernel is a service that points to this class
5858
// optional 3rd argument is the route name
@@ -97,9 +97,9 @@ that define your bundles, your services and your routes:
9797
of what you see in a normal ``config/packages/*`` file). You can also register
9898
services directly in PHP or load external configuration files (shown below).
9999

100-
**configureRoutes(RouteCollectionBuilder $routes)**
100+
**configureRoutes(RoutingConfigurator $routes)**
101101
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
103103
fun. You can also load external routing files (shown below).
104104

105105
Advanced Example: Twig, Annotations and the Web Debug Toolbar
@@ -134,10 +134,10 @@ hold the kernel. Now it looks like this::
134134
namespace App;
135135

136136
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
137+
use Symfony\Bundle\FrameworkBundle\Routing\Loader\Configurator\RoutingConfigurator;
137138
use Symfony\Component\Config\Loader\LoaderInterface;
138139
use Symfony\Component\DependencyInjection\ContainerBuilder;
139140
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
140-
use Symfony\Component\Routing\RouteCollectionBuilder;
141141

142142
class Kernel extends BaseKernel
143143
{
@@ -170,7 +170,7 @@ hold the kernel. Now it looks like this::
170170
}
171171
}
172172

173-
protected function configureRoutes(RouteCollectionBuilder $routes)
173+
protected function configureRoutes(RoutingConfigurator $routes)
174174
{
175175
// import the WebProfilerRoutes, only if the bundle is enabled
176176
if (isset($this->bundles['WebProfilerBundle'])) {

0 commit comments

Comments
 (0)
0