From ec542de8ad9ed68d979d4850da241b3e73987df9 Mon Sep 17 00:00:00 2001 From: Jordi Kroon Date: Mon, 22 Dec 2025 01:04:48 +0100 Subject: [PATCH] docs: document PHP 8.5.0 cookie partitioned attribute Add documentation for the new "partitioned" cookie option introduced in PHP 8.5.0 (CHIPS support). Updates include: - Added "partitioned" to the list of supported cookie options in setcookie() and setrawcookie() functions - Documented the new session.cookie_partitioned INI directive with description of CHIPS functionality - Added changelog entries for PHP 8.5.0 in affected function documentation - Updated session cookie parameter function references to include the new partitioned option --- reference/network/functions/setcookie.xml | 9 ++++++++- reference/network/functions/setrawcookie.xml | 7 +++++++ .../functions/session-get-cookie-params.xml | 3 +++ .../functions/session-set-cookie-params.xml | 3 +++ reference/session/ini.xml | 20 +++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) diff --git a/reference/network/functions/setcookie.xml b/reference/network/functions/setcookie.xml index d2f9a34e669b..253a969fd11f 100644 --- a/reference/network/functions/setcookie.xml +++ b/reference/network/functions/setcookie.xml @@ -159,7 +159,7 @@ An associative array which may have any of the keys expires, path, domain, - secure, httponly and samesite. + secure, httponly, partitioned and samesite. If any other key is present an error of level E_WARNING is generated. The values have the same meaning as described for the parameters with the same name. The value of the samesite @@ -206,6 +206,13 @@ + + 8.5.0 + + The "partitioned" entry was added in the options array. + If set to &true;, the cookie will be marked as Partitioned (CHIPS). + + 8.2.0 diff --git a/reference/network/functions/setrawcookie.xml b/reference/network/functions/setrawcookie.xml index 992c73278aa3..73aeea19bc2c 100644 --- a/reference/network/functions/setrawcookie.xml +++ b/reference/network/functions/setrawcookie.xml @@ -59,6 +59,13 @@ + + 8.5.0 + + The "partitioned" entry was added in the options array. + If set to &true;, the cookie will be marked as Partitioned (CHIPS). + + 7.3.0 diff --git a/reference/session/functions/session-get-cookie-params.xml b/reference/session/functions/session-get-cookie-params.xml index 05bc50f8184e..fd08605edf34 100644 --- a/reference/session/functions/session-get-cookie-params.xml +++ b/reference/session/functions/session-get-cookie-params.xml @@ -111,6 +111,9 @@ session.cookie_httponly + + session.cookie_partitioned + session.cookie_samesite diff --git a/reference/session/functions/session-set-cookie-params.xml b/reference/session/functions/session-set-cookie-params.xml index 499d1f35dd13..5ab15e74c990 100644 --- a/reference/session/functions/session-set-cookie-params.xml +++ b/reference/session/functions/session-set-cookie-params.xml @@ -167,6 +167,9 @@ session.cookie_httponly + + session.cookie_partitioned + session.cookie_samesite diff --git a/reference/session/ini.xml b/reference/session/ini.xml index e2ac51daf462..53b1348f6868 100644 --- a/reference/session/ini.xml +++ b/reference/session/ini.xml @@ -94,6 +94,12 @@ INI_ALL Prior to PHP 7.2.0, the default was "". + + session.cookie_partitioned + "0" + INI_ALL + Available as of PHP 8.5.0. + session.cookie_samesite "" @@ -662,6 +668,20 @@ + + + session.cookie_partitioned + bool + + + + Marks the cookie as partitioned (CHIPS), which means that the cookie will be + isolated to a first-party context. This setting can help mitigate + cross-site tracking (although it is not supported by all browsers). + + + + session.cookie_samesite