From 86fa70bc0d0a49ba12de3f6d7da8331eeb5a2120 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Tue, 3 Jan 2017 20:48:41 +0100 Subject: [PATCH 1/5] Update http_foundation.rst --- components/http_foundation.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index a924a94c799..061374a79af 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -377,6 +377,14 @@ method takes an instance of You can clear a cookie via the :method:`Symfony\\Component\\HttpFoundation\\ResponseHeaderBag::clearCookie` method. +You can also create a +:class:`Symfony\\Component\\HttpFoundation\\Cookie` object from a raw header value using :method:`Symfony\Component\HttpFoundation\Cookie::fromString`. + +.. tip:: + + You can directly send the cookie from a string using + ``$response->headers->set('set-cookie', 'key=value; secure', $replace)``. + Managing the HTTP Cache ~~~~~~~~~~~~~~~~~~~~~~~ From a909e28313877c7e27b76a38aeffa1b5fe9e6622 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Wed, 19 Apr 2017 09:45:41 +0200 Subject: [PATCH 2/5] feedback --- components/http_foundation.rst | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 061374a79af..66088c868c5 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -377,14 +377,9 @@ method takes an instance of You can clear a cookie via the :method:`Symfony\\Component\\HttpFoundation\\ResponseHeaderBag::clearCookie` method. -You can also create a +Note you can create a :class:`Symfony\\Component\\HttpFoundation\\Cookie` object from a raw header value using :method:`Symfony\Component\HttpFoundation\Cookie::fromString`. -.. tip:: - - You can directly send the cookie from a string using - ``$response->headers->set('set-cookie', 'key=value; secure', $replace)``. - Managing the HTTP Cache ~~~~~~~~~~~~~~~~~~~~~~~ From e233519f564da036677fe45a32957427af7e713e Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Wed, 19 Apr 2017 09:46:00 +0200 Subject: [PATCH 3/5] derp --- components/http_foundation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 66088c868c5..f4c63a91c35 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -377,7 +377,7 @@ method takes an instance of You can clear a cookie via the :method:`Symfony\\Component\\HttpFoundation\\ResponseHeaderBag::clearCookie` method. -Note you can create a +Note you can create a :class:`Symfony\\Component\\HttpFoundation\\Cookie` object from a raw header value using :method:`Symfony\Component\HttpFoundation\Cookie::fromString`. Managing the HTTP Cache From 09e27fa8ea5fdd49961bef2a4a53845bb0bf4949 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Wed, 19 Apr 2017 20:27:39 +0200 Subject: [PATCH 4/5] version added --- components/http_foundation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index f4c63a91c35..83c546ed06c 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -380,6 +380,9 @@ You can clear a cookie via the Note you can create a :class:`Symfony\\Component\\HttpFoundation\\Cookie` object from a raw header value using :method:`Symfony\Component\HttpFoundation\Cookie::fromString`. +.. versionadded:: 3.3 + The ``Cookie::fromString`` method was introduced in Symfony 3.3. + Managing the HTTP Cache ~~~~~~~~~~~~~~~~~~~~~~~ From 91329f452a1a45655afa24903b17af02b3ca0e2e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 24 Apr 2017 17:29:27 +0200 Subject: [PATCH 5/5] Add method parenthesis --- components/http_foundation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 83c546ed06c..aa87732cbba 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -381,7 +381,7 @@ Note you can create a :class:`Symfony\\Component\\HttpFoundation\\Cookie` object from a raw header value using :method:`Symfony\Component\HttpFoundation\Cookie::fromString`. .. versionadded:: 3.3 - The ``Cookie::fromString`` method was introduced in Symfony 3.3. + The ``Cookie::fromString()`` method was introduced in Symfony 3.3. Managing the HTTP Cache ~~~~~~~~~~~~~~~~~~~~~~~