Re: [RFC] Allow Reassignment of Promoted Readonly Properties in Constructor
| From: | Volker Dusch | Date: | Sat, 24 Jan 2026 18:51:37 +0000 |
| Subject: | Re: [RFC] Allow Reassignment of Promoted Readonly Properties in Constructor | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129915@lists.php.net to get a copy of this message | ||
On Thu, Jan 22, 2026 at 4:39 PM Nicolas Grekas
<nicolas.grekas+php@gmail.com> wrote:
>
> Here is a new RFC for you to consider:
> https://wiki.php.net/rfc/promoted_readonly_constructor_reassign
>
Thank you very much for the RFC. I really enjoyed reading it; clearly
explained, easy to read, and with a good focus on laying out how
everything works and considering edge cases. Especially the working
examples around "Child Classes Can Reassign Parent Properties" have
been great to read.
It's delightful that you were able to provide a PoC implementation for
me to check and answer the remaining questions I had.
Great to see more people being able to modify php-src to this scope.
I think this makes sense, aligns behavior with clone, and patches up
one edge case with using CPP over regular properties, easing
refactoring.
While this is not a problem I, personally, ran into, it makes sense to
me, and given any upcoming insights in the discussion, I'm in favor of
it.
Thank you,
Volker