title: Symfony 2 does not delete remember-me cookie when logout
body: <p>My goal is to do programmatically logout from controller. I use <a href="https://stackoverflow.com/a/28828377/2717270">this nice solution</a>. Everything works fine except that <code>LONGSESS</code> (renamed <code>REMEMBERME</code>) cookie not deleted. It deleted but not :) </p>
  
  <p>Logout in controller code:</p>
  
  <pre><code>$response = $this-&gt;redirectToRoute('homepage');
  $response-&gt;headers-&gt;clearCookie('LONGSESS');
  return $response;
  </code></pre>
  
  <p>So, call this action.</p>
  
  <ol>
  <li><p>Request headers for this action (as expected):</p>
  
  <pre><code>Cookie SESS=n4jbl1m61l6bceesbeusrbq044; LONGSESS=QXBwQnVuZGxlXEVudGl0eVxVc2VyOmRYTmxja0IxYzJWeUxtTnZiUT09OjE0NDgyMDMyMjQ6ZTFhNzBlNGEyMWM4NGM3N2UzYmI3ZmJiNWIzMGM5MDg2ZDAyOWY1ZGVhMWI4NTYyNGQ0OTJmNjVmNmRjOTY2NQ%3D%3D
  </code></pre></li>
  <li><p>Response headers to this action (as expected):</p>
  
  <pre><code>Set-Cookie:SESS=ai1gt79r49o184du3tknv7tdf6; path=/; domain=.myhost.local
  Set-Cookie:LONGSESS=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; httponly
  Set-Cookie:SESS=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; httponly
  </code></pre></li>
  <li><p>Redirect headers (as expected):</p>
  
  <pre><code>Location:/app_dev.php/
  </code></pre></li>
  <li><p>Next request headers to homepage (NOT as expected - <code>LONGSESS</code> value is the same as previous request):</p>
  
  <pre><code>Cookie:LONGSESS=QXBwQnVuZGxlXEVudGl0eVxVc2VyOmRYTmxja0IxYzJWeUxtTnZiUT09OjE0NDgyMDMyMjQ6ZTFhNzBlNGEyMWM4NGM3N2UzYmI3ZmJiNWIzMGM5MDg2ZDAyOWY1ZGVhMWI4NTYyNGQ0OTJmNjVmNmRjOTY2NQ%3D%3D; SESS=ai1gt79r49o184du3tknv7tdf6
  </code></pre></li>
  </ol>
  
  <p>So user is not logged out.</p>
  
  <p>How may it be? <code>LONGSESS</code> cookie set to <code>deleted</code>, expired but next request has the same value?</p>