title: symfony 3 cookies in a service
body: <p>I need to create a cookie in my service</p>
  
  <pre><code>public function __construct(EntityManager $em, RequestStack $request)
  {
      parent::__construct();
  
      $this-&gt;request = $request-&gt;getMasterRequest();
  }
  </code></pre>
  
  <p>then when I try to call this somewhere inside my service:</p>
  
  <pre><code>    echo $this-&gt;request-&gt;cookies-&gt;get('_ga');die;
  </code></pre>
  
  <p>I get cookie that's  created manually by me, but calling ->set(key, val) doesn't save my cookie</p>
  
  <pre><code> $this-&gt;request-&gt;cookies-&gt;set('test', time());
  echo $this-&gt;request-&gt;cookies-&gt;get('test');
  </code></pre>
  
  <p>I get time, but cookie only exists once, in scope of this webrequest, if I comment line with ->set then I should see time that isn't changing but I don't see it, because cookie isn't actually stored... any help?</p>