Re: [VOTE] Allow Reassignment of Promoted Readonly Properties in Constructor

From: Date: Tue, 24 Mar 2026 11:52:10 +0000
Subject: Re: [VOTE] Allow Reassignment of Promoted Readonly Properties in Constructor
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-130430@lists.php.net to get a copy of this message
Hi Nicolas On Mon, Mar 23, 2026 at 4:39 PM Nicolas Grekas <nicolas.grekas+php@gmail.com> wrote: > > It's now time to open the vote for the following RFC: > https://wiki.php.net/rfc/promoted_readonly_constructor_reassign > > The vote will close on 2026-04-07 at 16:00 UTC. I voted "no" because I think the property logic, especially readonly, is already too convoluted. We've already had to deploy multiple fixes to make it workable (those being unlocking during __clone, and clone() with). In my opinion, if you need to modify a property during construction, there's already private(set), for which local mutability is easy to restrict. Nonetheless, thanks for the RFC and thanks for entertaining my ideas for the technical changes. Ilija

« previous php.internals (#130430) next »