Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-18 Thread Christian Schneider
Am 18.01.2023 um 16:26 schrieb Claude Pache : >> Le 18 janv. 2023 à 16:20, Derick Rethans a écrit : >> >> if (version_compare(phpversion(), "8.4.0", ">")) { >> setcookie("test", "value", samesite: SameSite::Stricter); >> } else { >> setcookie("test", "value", samesite: SameSite::Strict); >> } >

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-18 Thread Claude Pache
> Le 18 janv. 2023 à 16:20, Derick Rethans a écrit : > > if (version_compare(phpversion(), "8.4.0", ">")) { > setcookie("test", "value", samesite: SameSite::Stricter); > } else { > setcookie("test", "value", samesite: SameSite::Strict); > } Or even, replace `version_compare(...)` w

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-18 Thread Derick Rethans
On Tue, 17 Jan 2023, Christian Schneider wrote: > Am 17.01.2023 um 15:59 schrieb G. P. B. : > > > > I might be again misunderstanding, but one cannot extend an enum as > > they are final classes under the hood. Currently, the only other > > native enum is the one that was added with the Randomi

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-17 Thread Tim Düsterhus
Hi On 1/17/23 15:59, G. P. B. wrote: Side-Note: Isn't SameSite a very generic name in the global namespace? I'm not sure what the PHP policy is here. AFAIK the global namespace is "owned" by PHP so that shouldn't be an issue per the usual policy. It's still pretty generic even if it does n

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-17 Thread Christian Schneider
Am 17.01.2023 um 15:59 schrieb G. P. B. : > Side-Note: Isn't SameSite a very generic name in the global namespace? I'm > not sure what the PHP policy is here. > > AFAIK the global namespace is "owned" by PHP so that shouldn't be an issue > per the usual policy. In a quick check I could not find

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-17 Thread G. P. B.
On Mon, 16 Jan 2023 at 15:36, Christian Schneider wrote: > Am 16.01.2023 um 14:39 schrieb G. P. B. : > > On Sun, 15 Jan 2023 at 20:58, Christian Schneider > wrote: > > Some comments: > > - I am not convinced that we should introduce a third way of providing > parameters to setcookie(). I don't t

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-16 Thread Christian Schneider
Am 16.01.2023 um 14:39 schrieb G. P. B. : > On Sun, 15 Jan 2023 at 20:58, Christian Schneider > wrote: > Some comments: > - I am not convinced that we should introduce a third way of providing > parameters to setcookie(). I don't think this function is used often enough > in common code to add

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-16 Thread G. P. B.
On Sun, 15 Jan 2023 at 16:40, Nicolas Grekas wrote: > Hi George, > > There's quite some activity on the HTTP cookies side. > I read about SameParty and Partitioned attributes recently, see: > - https://developer.chrome.com/docs/privacy-sandbox/chips/ > - https://github.com/cfredric/sameparty > >

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-15 Thread Claude Pache
> Le 14 janv. 2023 à 16:14, G. P. B. a écrit : > > Hello Internals, > > I would like to start the discussion about the Add SameSite cookie > attribute parameter RFC: > https://wiki.php.net/rfc/same-site-parameter > > This proposes to add an optional same site parameter to the setrawcooki(),

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-15 Thread Christian Schneider
Am 14.01.2023 um 16:14 schrieb G. P. B. : > I would like to start the discussion about the Add SameSite cookie > attribute parameter RFC: > https://wiki.php.net/rfc/same-site-parameter > > This proposes to add an optional same site parameter to the setrawcooki(), > setcookie() and session_set_cook

Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-15 Thread Nicolas Grekas
Hi George, Hello Internals, > > I would like to start the discussion about the Add SameSite cookie > attribute parameter RFC: > https://wiki.php.net/rfc/same-site-parameter > > This proposes to add an optional same site parameter to the setrawcooki(), > setcookie() and session_set_cookie_params()

[PHP-DEV] [RFC] Add SameSite cookie attribute parameter

2023-01-14 Thread G. P. B.
Hello Internals, I would like to start the discussion about the Add SameSite cookie attribute parameter RFC: https://wiki.php.net/rfc/same-site-parameter This proposes to add an optional same site parameter to the setrawcooki(), setcookie() and session_set_cookie_params() that takes a a value a n