Le jeu. 22 janv. 2026 à 16:33, Nicolas Grekas <[email protected]>
a écrit :

> Dear all,
>
> Here is a new RFC for you to consider:
> https://wiki.php.net/rfc/promoted_readonly_constructor_reassign
>
> As a quick intro, my motivation for that RFC is that I find it quite
> annoying that readonly properties play badly with CPP (constructor property
> promotion).
>
> Doing simple processing of any argument before assigning it to a readonly
> property forces opting out of CPP.
>
> This RFC would allow setting once a readonly property in the body of a
> constructor after the property was previously (and implicitly) set using
> CPP.
>
> This allows keeping property declarations in their compact form while
> still enabling validation, normalization, or conditional initialization.
>


Friendly reminder about this RFC. It's been quiet for 13 days so I plan to
start the vote on Thursday if there are no more concerns to the text of the
proposal.

Cheers,
Nicolas

Reply via email to