title: How to match all controllers and actions using routing.yml
body: <p>I am working on a project where I have about 98 controllers. We have decided to migrate this project to Symfony. I have been able to create a custom Bundle called "mdBundle".</p>
  
  <p>It gets registered and I able to access the controller without any issue if I use type: annotation in the routing.yml file.</p>
  
  <p>However because we have so many controllers it will take forever to create the anotations in the actions. Therefore I am trying to come up with a way that my routing.yml can handle any request and execute the controller requested.</p>
  
  <p>Right now my routing.yml looks like this:</p>
  
  <pre><code>mdRoute:
      path: /{_controller}/{_action}/
      defaults: { _controller: mdBundle:_controller:_action }
  </code></pre>
  
  <p>My <code>Controller(DefaultController.php)</code> is like this:</p>
  
  <pre><code>namespace mdBundle\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\HttpFoundation\Response;
  
  class DefaultController extends Controller
  {
  
  public function indexAction(Request $request)
  {
      return new Response('foo');
  
  }
  
  public function testingAction(Request $request)
  {
      return new Response('Bar');
  
  }
  }
  </code></pre>
  
  <p>When I run it I get the following error:
  LogicException in ControllerResolver.php line 69:
  Unable to parse the controller name "Default".</p>
  
  <p>My folder structure is a bit different than symfony's default. My Bundle is inside <code>/root/app/mdBundle/</code> (&lt;-- From here it is the same as Symfony). Anybody has any idea why this is not working.</p>
  
  <p>Or what could be another way to accomplish this without having to annotate every single action in my 98 contollers?</p>