<p dir="auto">I always wondered why the route name itself is not stored as part of the route object ... This would make it easier in some places.</p>
<p dir="auto">Would you be open for a PR to add this?</p>
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>4.0.6</td>
</tr>
</tbody>
</table>
<p dir="auto">Hi, guys</p>
<p dir="auto">I have a problem following.<br>
Could you please give me an advice?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="###&gt; symfony/framework-bundle ###
APP_ENV=prod

$ composer install --no-dev --optimize-autoloader
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating optimized autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  PHP Fatal error:  Uncaught Error: Class 'Symfony\Bundle\TwigBundle\TwigBundle' not found in C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\src\Ker
nel.php:32
!!  Stack trace:
!!  #0 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\http-kernel\Kernel.php(403): App\Kernel-&gt;registerBundles()
!!  #1 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\http-kernel\Kernel.php(122): Symfony\Component\HttpKernel\Kernel-&gt;initializeBundl
es()
!!  #2 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\framework-bundle\Console\Application.php(64): Symfony\Component\HttpKernel\Kernel
-&gt;boot()
!!  #3 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\console\Application.php(143): Symfony\Bundle\FrameworkBundle\Console\Application-
&gt;doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
!!  #4 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\bin\console(39): Symfony\Component\Console\Application-&gt;run(Object(Symfony\Component\Console\Inp
ut\ArgvInput))
!!  #5 {main}
!!    thrown in C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\src\Kernel.php on line 32
!!"><pre class="notranslate"><code class="notranslate">###&gt; symfony/framework-bundle ###
APP_ENV=prod

$ composer install --no-dev --optimize-autoloader
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating optimized autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  PHP Fatal error:  Uncaught Error: Class 'Symfony\Bundle\TwigBundle\TwigBundle' not found in C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\src\Ker
nel.php:32
!!  Stack trace:
!!  #0 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\http-kernel\Kernel.php(403): App\Kernel-&gt;registerBundles()
!!  #1 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\http-kernel\Kernel.php(122): Symfony\Component\HttpKernel\Kernel-&gt;initializeBundl
es()
!!  #2 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\framework-bundle\Console\Application.php(64): Symfony\Component\HttpKernel\Kernel
-&gt;boot()
!!  #3 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\vendor\symfony\console\Application.php(143): Symfony\Bundle\FrameworkBundle\Console\Application-
&gt;doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
!!  #4 C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\bin\console(39): Symfony\Component\Console\Application-&gt;run(Object(Symfony\Component\Console\Inp
ut\ArgvInput))
!!  #5 {main}
!!    thrown in C:\Users\xsunt\PhpstormProjects\xsun\tv\4.0\src\Kernel.php on line 32
!!
</code></pre></div>