Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130512 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id DBCD71A00BC for ; Tue, 31 Mar 2026 09:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774951004; bh=0WdqqNmo62bODQIGehJ3J66P1KkgRRKuyf2utAUO9Gk=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=Es0ZZHP3/3bxJ9IIshxyxEjj32RJZL6Qr6Fh6Mju5tDdlNKL+7Xzw2FC8zBRhNLZo VuzMJJSY06oNrhRjuhCHUKFLMesnnVIozMflzntQaKFC9G3jmo7QK6dqgaGEnNe3in pibuh5aTpKm5mQR7o/nZDlyvLW/VfSeBcYKIhVu9FOjHI2imirkTNmkOjGxW7V+91X phkYCP2uYPXCEnOtaP5akcoBrZ+Yd7kDIv/sB5Mb9ErAyHXZpNTmaRM6kTjPdcJUhU P3R835QcCKGHeTLNQRA8CfS/lkaRfQH//X2cGumJ/whrkBzD++YJhNe2ybB4Khwfgx F2co7eqPvCAcg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B9A8018060A for ; Tue, 31 Mar 2026 09:56:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: *** X-Spam-Status: No, score=3.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail.xdebug.org (mail.xdebug.org [176.126.244.128]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 31 Mar 2026 09:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774950994; bh=0WdqqNmo62bODQIGehJ3J66P1KkgRRKuyf2utAUO9Gk=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=k3YeJp7XpCG1///dZ3UlIxOxKf56n3Lh5rBS5VjpAU3F3iy8CAlHMwBkGkZJspgzB n7gt4quxK2mTaNtyEU+mX+Q4pMwRGXmsY+dyhsjZ7ZT/8YdaMGo/onA7FeBWN6hg6T t3Gc6lhunIO0CeDFpg/OL+Qd5IGF9FDPQ9Wx+0NgReOA3FqbYa/snEAY+Beueoc5ck 6QgNpBZ7Lfp2xaMRAL3aFIsH7Fj1VDR7rwpPoHw0jXfq3QJO7hhKrFUStja5G94cRh vouyF/pmE8XYZYAub+/Nm2SQ4H+YK8uTU8X29nxQcyhv0PnUcVn3UFY2EVffXK7s+Q 8+hG5hB/lXYMQ== Received: from localhost (localhost [IPv6:::1]) by mail.xdebug.org (Postfix) with ESMTPS id C9C1E200E8; Tue, 31 Mar 2026 09:56:34 +0000 (UTC) Date: Tue, 31 Mar 2026 10:56:34 +0100 (BST) To: Daniel Scherzer cc: php internals Subject: Re: [PHP-DEV] [RFC] [Discussion] `#[\Override]` for class constants In-Reply-To: Message-ID: References: Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII From: derick@php.net (Derick Rethans) On Mon, 30 Mar 2026, Daniel Scherzer wrote: > I'd like to start the discussion for a new RFC about adding support for > `#[\Override]` for class constants. > > * RFC: https://wiki.php.net/rfc/override_constants > * Implementation: https://github.com/php/php-src/pull/20478 > > I'd also like to draw specific attention to the open question, which I am > soliciting feedback on: how should `#[\Override]` work for enum cases? See > the RFC page for details. I think I'm on the " Always reject using #[\Override] on an enum case, saying that the attribute does not target enum cases" side here, as mixing class constants with enum cases sounds like a mismatch to me. cheers, Derick