Re: Re: Issues with readonly classes
| From: | Marco Pivetta | Date: | Wed, 21 Sep 2022 09:32:29 +0000 |
| Subject: | Re: Re: Issues with readonly classes | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118679@lists.php.net to get a copy of this message | ||
On Wed, 21 Sept 2022 at 11:30, Nicolas Grekas <nicolas.grekas+php@gmail.com>
wrote:
> Hi all,
>
>
> > When I was working on the readonly class RFC, I realized that the
> readonly
> > keyword very naturally fits services besides value objects. So my
> > expectation has been that until we can fix the issue with cloning, people
> > would mainly apply readonly to services. Not that it is very useful, but
> I
> > would also feel some kind of weird fulfillment by doing so.
> >
> > Regarding cloning: I created a WIP PR not long ago to fix the
> > aforementioned cloning issue, and I'll pursue a readonly amendment RFC in
> > the coming weeks (or month) containing the long awaited improvements for
> > cloning (hopefully together with the "clone with" construct) and possibly
> > with this inheritance-related change Nicolas proposed, unless someone can
> > come up with an ultimate counter-argument.
> >
>
> What's your take about 8.2? As I demonstrated, readonly classes are broken
> because of this propagation to child classes.
>
s/broken/working as expected
Marco Pivetta
https://twitter.com/Ocramius
https://ocramius.github.io/