title: Issue with undefined session "setFlash" - Symfony2
body: <p>i'm working through a <a href="https://openclassrooms.com/courses/developpez-vos-applications-web-avec-symfony2/manipulez-vos-nouveaux-jouets" rel="nofollow">tutorial</a> on Symfony2 (im a newbie on PHP) and i'm having difficulty displaying a flash  message from the <em>Session</em> Object.
  Below my <em>Controller</em> code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  
  namespace tuto\WelcomeBundle\Controller;
  use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  
  
  class HomepageController extends Controller
  {
      public function indexAction()
      {
          $this-&gt;get('session')-&gt;setFlash('notice', 'Bienvenue à toi '.$this-&gt;get('session')-&gt;get('user_name').' !');
          return $this-&gt;render('tutoWelcomeBundle:Homepage:index.html.twig');
      }
      public function whoAmIAction($name)
      {
          # get the session
          $session = $this-&gt;get('session');
          # store the user'name in the session
          $session-&gt;set('user_name', $name);
          return $this-&gt;redirect($this-&gt;container-&gt;get('router')-&gt;generate('tutoWelcomeBundle_homepage'));
      }
  }</code></pre>
  </div>
  </div>
  <br>
  The <code>setFlash('notice', 'Bienvenue à toi '.$this-&gt;get('session')-&gt;get('user_name').' !')</code> is returning an '<em>undefined method error</em>' .<br>
  I did try to declare it in the AppKernel.php as part of the bundles but the namespace <em>Symfony\Component\HttpFoundation\Session</em> is not found.<br>
  Below the layout rendering it </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
    &lt;header&gt;
      &lt;a href="{{ path('homepage') }}" title="Retour à l'accueil"&gt;Tutoriel Symfony2&lt;/a&gt;
      Bonjour et bienvenue dans ce tutoriel pour Symfony2&lt;/p&gt;
      &lt;p&gt;
        {% for key, flash in app.session.getFlashes()%} {%if flash%} {{flash}} {%endif%} {%endfor%}
      &lt;/p&gt;
    &lt;/header&gt;
  
    &lt;div id="content"&gt;
      {% block content %}{% endblock %}
    &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Platform Info<br>
  WAMP 2.5
  Symfony 2.7</p>