Skip to content

Commit 2aedc6a

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [HttpFoundation] Cookies Having Independent Partitioned State (CHIPS)
2 parents 3958a97 + 419f5d7 commit 2aedc6a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/http_foundation.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,21 @@ a new object with the modified property::
508508
->withDomain('.example.com')
509509
->withSecure(true);
510510

511+
It is possible to define partitioned cookies, also known as `CHIPS`_, by using the
512+
:method:`Symfony\\Component\\HttpFoundation\\Cookie::withPartitioned` method::
513+
514+
$cookie = Cookie::create('foo')
515+
->withValue('bar')
516+
->withPartitioned();
517+
518+
// you can also set the partitioned argument to true when using the `create()` factory method
519+
$cookie = Cookie::create('name', 'value', partitioned: true);
520+
521+
.. versionadded:: 6.4
522+
523+
The :method:`Symfony\\Component\\HttpFoundation\\Cookie::withPartitioned`
524+
method was introduced in Symfony 6.4.
525+
511526
Managing the HTTP Cache
512527
~~~~~~~~~~~~~~~~~~~~~~~
513528

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

0 commit comments

Comments
 (0)