This is a (multiple allowed):
[ ] feature-discussion (RFC)
CakePHP Version: 3.5.0-RC1
I wanted to delete a cookie using the new CookieCollection.
$cookies = $this->request->getCookieCollection();
if ($cookies->has('remember_me')) {
$cookies = $cookies->remove('remember_me');
}
$this->response = $this->response->withCookieCollection($cookies);
Although the method exists in the ServerRequest object, the withCookieCollection() method doesn't seem to exist in the Response object yet.
The response with the modified cookie collection
It might be easier to use if the method was $response->withoutCookie('remember_me');
Indeed pretty straight forward.
Thanks for taking care of this @jorisvaesen 馃檪
Closing as we have a PR.
Most helpful comment
It might be easier to use if the method was
$response->withoutCookie('remember_me');