title: Routing order symfony 4
body: <p>I want to have a url with a wildcard at the end <code>site.com/{username}</code> after trying to match url's like <code>site.com/photos</code> and <code>site.com/blog</code>. I'm using annotations and have two controllers.</p>
  
  <p>I found an answer here <a href="https://stackoverflow.com/questions/11759057/ordering-of-routes-using-annotations">Ordering of routes using annotations</a></p>
  
  <p>But the folder structure is different in version 4 and in the answer they are using YAML while I'm using annotations, so I don't fully understand where to put what.</p>
  
  <p><strong>Video Controller</strong></p>
  
  <pre><code>    /**
       * @Route("/videos", name="videos")
       */
      public function index()
      {
        // Show video homepage
      }
  </code></pre>
  
  <p><strong>User Controller</strong></p>
  
  <pre><code>    /**
       * @Route("/{username}", name="profile")
       */
      public function index()
      {
          // Hello {username} !
      }
  </code></pre>
  
  <p>In this order, <code>site.com/videos</code> reaches User controller instead of videos. Do I have to switch to manually putting <em>all</em> URL structures in yaml format or is there a way to set priority in annotations?</p>
  
  <p>So far the only method I found was to create a controller starting with the letter "Z", and putting the action/route in there, that seems to run the route last.</p>