title: Symfony4: No route found for "GET /lucky/number"
body: <p>I am starting to play with symfony4. I've just created new application and create new LuckyController. It works with routes.yaml configured in this manner:</p>
  
  <pre><code>lucky:
      path: /lucky/number
      controller: App\Controller\LuckyController::number
  </code></pre>
  
  <p>With the following controller:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Controller;
  
  use Symfony\Component\HttpFoundation\Response;
  
  class LuckyController
  {
      public function number()
      {
          return new Response('&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;' . rand(111, 999) . '&lt;/body&gt;&lt;/html&gt;');
      }
  }
  </code></pre>
  
  <p>But I want to use annotations. So I decided to comment routes.yaml. Following documentation that explain how to <a href="http://symfony.com/doc/current/routing.html#creating-routes" rel="noreferrer">create a route in symfony</a> I've made this:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Symfony\Component\HttpFoundation\Response;
  use Symfony\Component\Routing\Annotation\Route;
  
  class LuckyController extends Controller
  {
      /**
       * @Route("/lucky/number")
       */
      public function number()
      {
          return new Response('&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;' . rand(111, 999) . '&lt;/body&gt;&lt;/html&gt;');
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/qVC4h.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qVC4h.png" alt="No route found"></a></p>