8000 feature #19118 [HttpFoundation] Cookies Having Independent Partitione… · symfony/symfony-docs@419f5d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 419f5d7

Browse files
committed
feature #19118 [HttpFoundation] Cookies Having Independent Partitioned State (CHIPS) (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- [HttpFoundation] Cookies Having Independent Partitioned State (CHIPS) Fix #19027 Commits ------- 1673937 [HttpFoundation] Cookies Having Independent Partitioned State (CHIPS)
2 parents 64f1969 + 1673937 commit 419f5d7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/http_foundation.rst

+16
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,21 @@ a new object with the modified property::
531531
->withDomain('.example.com')
532532
->withSecure(true);
533533

534+
It is possible to define partitioned cookies, also known as `CHIPS`_, by using the
535+
:method:`Symfony\\Component\\HttpFoundation\\Cookie::withPartitioned` method::
536+
537+
$cookie = Cookie::create('foo')
538+
->withValue('bar')
539+
->withPartitioned();
540+
541+
// you can also set the partitioned argument to true when using the `create()` factory method
542+
$cookie = Cookie::create('name', 'value', partitioned: true);
543+
544+
.. versionadded:: 6.4
545+
546+
The :method:`Symfony\\Component\\HttpFoundation\\Cookie::withPartitioned`
547+
method was introduced in Symfony 6.4.
548+
534549
Managing the HTTP Cache
535550
~~~~~~~~~~~~~~~~~~~~~~~
536551

@@ -982,3 +997,4 @@ Learn More
982997
.. _OWASP guidelines: https://cheatsheetseries.owasp.org/cheatsheets/AJAX_Security_Cheat_Sheet.html#always-return-json-with-an-object-on-the-outside
983998
.. _RFC 8674: https://tools.ietf.org/html/rfc8674
984999
.. _Doctrine Batch processing: https://www.doctrine-project.org/projects/doctrine-orm/en/2.14/reference/batch-processing.html#iterating-results
1000+
.. _`CHIPS`: https://developer.mozilla.org/en-US/docs/Web/Privacy/Partitioned_cookies

0 commit comments

Comments
 (0)
0