Silex clearCookie不工作?

Trying to use Silex's clearCookie function on the 'ResponseHeaderBag'

The cookie was set something like this, passing an instance of the Cookie class to setCookie:

$response->headers->setCookie(new Cookie(
    $cookieName,
    $value,
    $timeStamp,
    '/',
    $domain,
    false,
    false
));

Notice we're setting values for all the optional parameters.

We're trying to delete the cookie simply using the name parameter:

$responseHeaders->clearCookie($cookieName);

... which doesn't seem to do anything.

The solution was clearCookie also takes several optional parameters. We also had to pass the same values for those optional arguments that matched what we used when we called setCookie!
Basically the same except we don't need the value or timestamp parameters.

$responseHeaders->clearCookie(
    $cookieName,
    '/',
    $domain,
    false,
    false
);