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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php