title: How can I access to the twig app.request.get('_route_params') in a twig rendered for a forwarded controller?
body: <p>I'm trying to use the "forward" method from a main Controller. first I'm assuring me that the original "request" is sent from the first controller to the "forwarded controller" (If I do a var_dump in both controllers I get the same request object.).  But when I try access to the "request object" from the twig rendered from forwarded controller, the app.request.get(_route), app.request.get(_route_params) and others are differents. It is as if the original request is lost only from twig globals.</p>
  
  <pre class="lang-php prettyprint-override"><code>namespace MyBundle\Controller;
  
  //...    
  
  class BookingController extends Controller {
  
      /**
       * @Route("/book/hotel/{slug}", name="booking_hotel")
       */
      public function establishmentAction(Request $request, $slug = null) {
          \dump($request); // dumper 1
  
          return $this-&gt;forward('ExpediaBundle:Booking:index', array('request' =&gt; $request);
      }
  }
  </code></pre>
  
  <pre class="lang-php prettyprint-override"><code>namespace ExpediaBundle\Controller;
  
  //...
  
  class BookingController extends Controller {
  
      /**
       * @Route("/expedia/booking", name="expedia_booking")
       * @Template()
       */
      public function indexAction(Request $request)
      {
          \dump($request); // dumper 2
  
          // The dumper 1 === dumper 2
  
          return array();
      }
  }
  </code></pre>
  
  <pre><code>{# file: ExpediaBundle:Booking:index.html.twig  #}    
  
  {{ dump(app.request.attributes.get('_route_params')) }} -&gt; works fine
  {{ dump(app.request.get('_route_params')) }} -&gt; works fine
  </code></pre>
  
  <p>When I enter to the route <a href="http://localhost/expedia/booking" rel="nofollow noreferrer">http://localhost/expedia/booking</a> (without the forward) I can see the _route_params dumps correctly. But if I use the forward controller the varDumper returns null for both cases.</p>
  
  <pre><code>http://localhost/book/hotel/hotelname:
  
  {{ dump(app.request.attributes.get('_route_params')) }} -&gt; null
  {{ dump(app.request.get('_route_params')) }} -&gt; null
  </code></pre>
  
  <hr>
  
  <p>What am I doing wrong?</p>
  
  <p>Thank you in advanced.</p>