Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119293 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 62779 invoked from network); 17 Jan 2023 15:38:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jan 2023 15:38:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0F75C180511 for ; Tue, 17 Jan 2023 07:38:24 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15623 212.45.192.0/19 X-Spam-Virus: No X-Envelope-From: Received: from mail.gna.ch (mail.gna.ch [212.45.196.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 17 Jan 2023 07:38:23 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id A94C63A1D7A for ; Tue, 17 Jan 2023 16:38:21 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from mail.gna.ch ([127.0.0.1]) by localhost (darkcity.gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mtSqNMaEbmvc for ; Tue, 17 Jan 2023 16:38:21 +0100 (CET) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2ea4:cf00:4c3d:b7c0:93bc:8c30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 28DED3A0DAA for ; Tue, 17 Jan 2023 16:38:21 +0100 (CET) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Date: Tue, 17 Jan 2023 16:38:20 +0100 References: <22D992B7-62B3-4A4F-934F-17D53058FD35@cschneid.com> To: PHP internals In-Reply-To: Message-ID: <138CAD88-013E-40C7-8F0F-2034A7B0980B@cschneid.com> X-Mailer: Apple Mail (2.3731.300.101.1.3) Subject: Re: [PHP-DEV] [RFC] Add SameSite cookie attribute parameter From: cschneid@cschneid.com (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. >=20 > 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 any other Enums defined in the core. = Would this be the first one? I guess I was comparing it to constants where in most cases the constant = name reflects where it is used, e.g. STR_PAD_LEFT and I was therefore = wondering whether the name SameSite should somehow contain cookie in one = form or another. Or is this frowned upon for Enums? > Are there any Enums in core PHP APIs where new values could be added = in the future and how is the plan for code supporting multiple PHP = version there? This was just something which crossed my mind when = thinking about APIs with Enums. This is not really related to this RFC = so I understand if you want to ignore this part :-) >=20 > 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 Randomizer Additions RFC [1] so this topic hasn't come up yet as the = enum for ext-random is definetely complete. I'm talking about adding new values in later PHP versions, let's for = example assume they would add a SameSite mode "Stricter" and PHP wants = to support that. How would one write code to use "Stricter" in code meant to work for = both old and new PHP versions? - Chris