title: Symfony 2.4 Rendering a controller in TWIG throws "Rendering a fragment can only be done when handling a Request." Exception
body: <p>After upgrading from Symfony 2.3 to 2.4, the following exception is being thrown: </p>
  
  <p>An exception has been thrown during the rendering of a template ("Rendering a fragment can only be done when handling a Request.") in PageBundle::base.html.twig at line 34.</p>
  
  <p>The code is trying to render a controller:</p>
  
  <pre><code>{% if not app.user %}
  &lt;div id="login" class="fourcol last"&gt;
      {{ render(controller("SecurityBundle:Front/Security:login")) }}
  &lt;/div&gt;
  {% endif %}
  </code></pre>
  
  <p>The exception is being thrown by fragmentHandler because $request is null:</p>
  
  <pre><code>public function render($uri, $renderer = 'inline', array $options = array())
  {
      if (!isset($options['ignore_errors'])) {
          $options['ignore_errors'] = !$this-&gt;debug;
      }
  
      if (!isset($this-&gt;renderers[$renderer])) {
          throw new \InvalidArgumentException(sprintf('The "%s" renderer does not exist.', $renderer));
      }
  
      if (!$request = $this-&gt;getRequest()) {
          throw new \LogicException('Rendering a fragment can only be done when handling a Request.');
      }
  var_dump($request); die();
      return $this-&gt;deliver($this-&gt;renderers[$renderer]-&gt;render($uri, $request, $options));
  } 
  </code></pre>
  
  <p>This is also happening on other twig render function calls.</p>
  
  <p>List of Symfony component versions from composer:</p>
  
  <pre><code>symfony/assetic-bundle               v2.3.0
  symfony/icu                          v1.2.0
  symfony/monolog-bundle               v2.3.0
  symfony/swiftmailer-bundle           v2.3.4
  symfony/symfony                      v2.4.0 
  </code></pre>
  
  <p>Any help would be greatly appreciated </p>