<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.1.0</p>
<p dir="auto"><strong>Description</strong><br>
When using the new <code class="notranslate">name_prefix</code> option, routes will be generate both with prefix and without prefix.</p>
<p dir="auto"><strong>How to reproduce</strong><br>
In <code class="notranslate">config/routes.yaml</code> add a prefix for a controller folder</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="admin:
    resource: ../src/Controller
    type: annotation
    name_prefix: admin_"><pre class="notranslate"><code class="notranslate">admin:
    resource: ../src/Controller
    type: annotation
    name_prefix: admin_
</code></pre></div>
<p dir="auto">And, by using <code class="notranslate">debug:router</code> command, you will see that a router named <code class="notranslate">dashboard</code> will be created 2 times.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="------------------------------------------------------ -------- -------- ------ -----------------------------------------
  Name                                                   Method   Scheme   Host   Path
 ------------------------------------------------------ -------- -------- ------ -----------------------------------------
  dashboard                                              ANY      ANY      ANY    /
  admin_dashboard_index                                  ANY      ANY      ANY    /"><pre class="notranslate"><code class="notranslate">------------------------------------------------------ -------- -------- ------ -----------------------------------------
  Name                                                   Method   Scheme   Host   Path
 ------------------------------------------------------ -------- -------- ------ -----------------------------------------
  dashboard                                              ANY      ANY      ANY    /
  admin_dashboard_index                                  ANY      ANY      ANY    /
</code></pre></div>
<p dir="auto">Please read this post:</p>
<p dir="auto"><a href="https://groups.google.com/d/msg/symfony2/uRoYVaczJWI/NQgYt6m2mY0J" rel="nofollow">https://groups.google.com/d/msg/symfony2/uRoYVaczJWI/NQgYt6m2mY0J</a></p>