Re: Re: Issues with readonly classes

From: Date: Wed, 21 Sep 2022 16:03:37 +0000
Subject: Re: Re: Issues with readonly classes
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-118682@lists.php.net to get a copy of this message
Hi On 9/21/22 11:48, Nicolas Grekas wrote:
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
broken. see thread
Working as expected (or: working as designed). The behavior with regard to inheritance was an explicit section (with its own headline) in the RFC and thus was voted and agreed-on. Changing that would be a non-trivial change from the agreed-on behavior and thus warrants another vote at the very least. The same is true for reverting the readonly class feature entirely, especially since PHP 8.2 is in the RC phase where it's not entirely unreasonable for users to start building on the anticipated features. FWIW personally I would've preferred avoiding this problem by disallowing readonly classes to appear within inheritance hierarchies entirely. Best regards Tim Düsterhus

« previous php.internals (#118682) next »