diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 6b3d9746e57..be6db4ab7ab 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -413,7 +413,7 @@ attribute:: use Symfony\Component\HttpFoundation\Cookie; - $response->headers->setCookie(new Cookie('foo', 'bar')); + $response->headers->setCookie(Cookie::create('foo', 'bar')); The :method:`Symfony\\Component\\HttpFoundation\\ResponseHeaderBag::setCookie`