Re: [RFC] [Discussion] `#[\Override]` for class constants

From: Date: Sun, 19 Apr 2026 01:19:45 +0000
Subject: Re: [RFC] [Discussion] `#[\Override]` for class constants
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-130665@lists.php.net to get a copy of this message
Hi internals, I have updated the RFC to resolve the open issue about #[\Override] on enum cases - when marked with #[\Override], the enum case must be overriding an inherited class constant. The fact that this is so uncommon makes it all the more important that when it is intentional, it can be made clear. This qualifies as a "major change" to the RFC and triggers a 14 day cooldown period. -Daniel On Mon, Mar 30, 2026 at 4:36 PM Daniel Scherzer <daniel.e.scherzer@gmail.com> wrote: > Hi internals, > > 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. > > Thanks, > -Daniel >

« previous php.internals (#130665) next »