title: Extending Symfony2 Controller Resolver
body: <p>I am currently creating a bundle which can rename fooAction into fooAjaxAction if request is an Ajax Request. 
  As the answer of <a href="https://stackoverflow.com/questions/24672349/edit-symfony-behavior-with-ajax-actions">that question</a> says, I have to extend the controller resolver class. 
  I have a <code>ResourceNotFoundException</code> if I change the controller_resolver.class in config.yml . but if I don't, I don't have any errors (but there is no override so this is not what I want)</p>
  
  <p><strong>My questions are : how can i register my new controller resolver and use it ? I am right ? Wrong ?</strong> </p>
  
  <p>This is what I've done : </p>
  
  <p><em>You can find my Bundle for testing in packagist and download it via :</em></p>
  
  <p><code>composer require  "/prefix-bundle":"dev-dev"</code></p>
  
  <p><em>activate it in AppKernel.php:</em>  </p>
  
  <pre><code>&lt;?php 
  // AppKernel.php
  new \PrefixBundle\PrefixBundle()
  </code></pre>
  
  <p>Config</p>
  
  <pre><code># App/Config/config.yml
  parameters:
      controller_resolver.class: PrefixBundle\Component\Controller\ControllerResolver
  </code></pre>
  
  <p>So this is my custom Controller.</p>
  
  <pre><code>&lt;?php 
  namespace \PrefixBundle\Component\Controller;
  
  use Symfony\Component\HttpKernel\ControllerControllerResolver as BaseControllerResolver;
  use Symfony\Component\HttpFoundation\Request;
  
  class ControllerResolver extends BaseControllerResolver
  {
  
      public function getArguments(Request $request, $controller)
      {
          parent::getArguments($request, $controller);
      }
  }
  </code></pre>
  
  <p>I am assuming that this controller is doing nothing for instance, I will add logic in the future.</p>