Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119435 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99460 invoked from network); 31 Jan 2023 22:54:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Jan 2023 22:54:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21D0B180504 for ; Tue, 31 Jan 2023 14:54:57 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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, 31 Jan 2023 14:54:56 -0800 (PST) Received: by mail-lj1-f176.google.com with SMTP id b13so7592828ljf.8 for ; Tue, 31 Jan 2023 14:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirtes.cz; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LyZSCRhRBTyqL9SkD+40JnMyGay2gnAvcEx+bOAvGvk=; b=RLHu5mCiIpUudNyhdI+La3l070X5v9ayQfOqTUeh1PPNMmDdA1UyggSZyNONAG9qrN XmKtv7/3ylZTaXC+TUETUUb29TZilfm951JQ6F9jG0S5wWqXMO/vnENCjX79XGagSlGb QOl7bPfrbzmmv65aw3TnjTbK2dwv+bhbFgMSM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LyZSCRhRBTyqL9SkD+40JnMyGay2gnAvcEx+bOAvGvk=; b=1EAx0eNW8BZohxrK7IDoMdHJGtRTSBomanaAe6wA7kRGbSaPabL2vehvu1BgtLluKA PuKIP05kUwlButWCFEqjrEaj11mql86jlnbi/kjKO+AUcyLP0ctFgzd3HDPaf5v4am7v aXp19GyDSQrMhL0SeXDOVf2CclVr1/ItBWLNk87nUltMiaOMwOMCjz8EAZyzrtdmCDMM qqb9+IlgVnUAZraRyXd9+2yLtHghHWRvtefyv6ny47eD6J2Sys2ACjTIDeCav0+vB9go XW9e7jjSH8lcBBfhUFbTPPJ6ExUrPzoML1dYm8zWhahIGuTMRPBR+WZc1I5nMTC7D85c Uf5g== X-Gm-Message-State: AO0yUKVxbyFGewXO2n25xZ58Nd39F4s+mXULvypV/JbGYBIGCJ+uDGEM +IrPC6+Qm8gWekYwJ2HqzbIgu6GdbAOltP+i32Rnmg== X-Google-Smtp-Source: AK7set8DeKyOabUKOjAaH9M0LDY8upPSw4W4daYvWz5WyEpNdZkcetKxlDsT3sdFEw9uLvEEJSamDvMDzXAFKeoQvHI= X-Received: by 2002:a2e:86d7:0:b0:28e:9e65:36be with SMTP id n23-20020a2e86d7000000b0028e9e6536bemr2529533ljj.92.1675205694808; Tue, 31 Jan 2023 14:54:54 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 31 Jan 2023 23:54:43 +0100 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000005d7d8205f39738ba" Subject: Re: [PHP-DEV] [RFC] [Discussion] Typed class constants From: ondrej@mirtes.cz (=?UTF-8?Q?Ond=C5=99ej_Mirtes?=) --0000000000005d7d8205f39738ba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I fully support this RFC. PHPStan added support for PHPDoc types in class constants some time ago - it=E2=80=99s useful to rely on the same constant = type even in subclasses when accessing them via static:: or $object::. On Tue 31. 1. 2023 at 22:01, M=C3=A1t=C3=A9 Kocsis = wrote: > Hi Everyone, > > A few years ago, Benas Seliuginas announced the "Typed constants" RFC ( > https://externals.io/message/110755) which apparently had a > positive reception overall. > Unfortunately, there were some issues with the implementation (namely, wi= th > the parser) > so the RFC was stuck. > > A few weeks ago, I reached out to Benas whether he intended to resurrect > the proposal, but > due to time constraints, he couldn't, and was OK with me continuing it. > With some help from > Bob Weinand, I managed to overcome the implementation difficulties, and > adapted it > to the newly added type-related features. > > Please find the updated RFC here: > https://wiki.php.net/rfc/typed_class_constants. > > Regards, > M=C3=A1t=C3=A9 > --=20 Ond=C5=99ej Mirtes --0000000000005d7d8205f39738ba--