From e3236354dd181d52f8241a59c5ec612f45423315 Mon Sep 17 00:00:00 2001 From: divinity76 Date: Tue, 25 Aug 2026 17:48:00 +0200 Subject: [PATCH 1/4] How to flush cookies as of PHP8 Prior to php8, curl_close($ch) would flush the cookie list. Code that depend on the cookie list to be flushed on curl_close() breaks on PHP8. Document an alternative way to flush the cookie list: curl_setopt($ch, CURLOPT_COOKIELIST, "FLUSH"); --- reference/curl/functions/curl-close.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reference/curl/functions/curl-close.xml b/reference/curl/functions/curl-close.xml index 207b3b1d8e7d..3299de429bf5 100644 --- a/reference/curl/functions/curl-close.xml +++ b/reference/curl/functions/curl-close.xml @@ -9,7 +9,7 @@ &warn.deprecated.function-8-5-0; - + &reftitle.description; @@ -18,6 +18,15 @@ CurlHandlehandle ¬e.resource-migration-8.0-dead-function; + + + If cookies need to be written before the handle is automatically + destroyed, call + curl_setopt(handle, + CURLOPT_COOKIELIST, "FLUSH"). + + + Closes a cURL session and frees all resources. The cURL handle, handle, is also deleted. From f075589b4a63ce9ccad6cd61ea95552e3664c5f2 Mon Sep 17 00:00:00 2001 From: divinity76 Date: Tue, 25 Aug 2026 20:19:20 +0200 Subject: [PATCH 2/4] whitespace Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- reference/curl/functions/curl-close.xml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/reference/curl/functions/curl-close.xml b/reference/curl/functions/curl-close.xml index 3299de429bf5..879c8e7c9cb9 100644 --- a/reference/curl/functions/curl-close.xml +++ b/reference/curl/functions/curl-close.xml @@ -19,13 +19,12 @@ ¬e.resource-migration-8.0-dead-function; - - If cookies need to be written before the handle is automatically - destroyed, call - curl_setopt(handle, - CURLOPT_COOKIELIST, "FLUSH"). - - + + If cookies need to be written before the handle + is destroyed, call curl_setopt with + CURLOPT_COOKIELIST set to "FLUSH". + + Closes a cURL session and frees all resources. The cURL handle, From 15232c7256820130f3fc2baf6d52c24f8a0fec58 Mon Sep 17 00:00:00 2001 From: divinity76 Date: Thu, 27 Aug 2026 21:15:05 +0200 Subject: [PATCH 3/4] Update reference/curl/functions/curl-close.xml Co-authored-by: Louis-Arnaud --- reference/curl/functions/curl-close.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/curl/functions/curl-close.xml b/reference/curl/functions/curl-close.xml index 879c8e7c9cb9..720d7e543e14 100644 --- a/reference/curl/functions/curl-close.xml +++ b/reference/curl/functions/curl-close.xml @@ -19,11 +19,11 @@ ¬e.resource-migration-8.0-dead-function; - + If cookies need to be written before the handle is destroyed, call curl_setopt with CURLOPT_COOKIELIST set to "FLUSH". - + From 884c31ad27aa3c8ffddc1c46d0f6cba93e6fbccd Mon Sep 17 00:00:00 2001 From: divinity76 Date: Thu, 27 Aug 2026 21:18:48 +0200 Subject: [PATCH 4/4] copypasta accidentally f075589b4a63ce9ccad6cd61ea95552e3664c5f2 did more than just fix whitespace, it removed the copypastability. --- reference/curl/functions/curl-close.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/curl/functions/curl-close.xml b/reference/curl/functions/curl-close.xml index 720d7e543e14..e2d3544be1a9 100644 --- a/reference/curl/functions/curl-close.xml +++ b/reference/curl/functions/curl-close.xml @@ -21,8 +21,8 @@ If cookies need to be written before the handle - is destroyed, call curl_setopt with - CURLOPT_COOKIELIST set to "FLUSH". + is destroyed, call curl_setopt(handle, + CURLOPT_COOKIELIST, "FLUSH").