Am 24.01.2023 um 09:55 schrieb Máté Kocsis <kocsismat...@gmail.com>: > We've just opened the vote for the "Readonly amendments" RFC, which is > going to be open for 2 weeks (until 2023-02-07). > > Link: https://wiki.php.net/rfc/readonly_amendments > Discussion: https://externals.io/message/119007
I like the idea of more power to developers (even if they can shoot themselves in the foot), so I'm supporting this RFC. While reading the example "Here is an example of a non-readonly child class that tracks the number of times a method has been called ... Such constructs are commonly used in e.g. mock classes ..." I was wondering why the same argument isn't applicable to most classes recently proposed as 'final', e.g. Text or Dequeue. I know that there is the school of thought that "inheritance is bad" which discourages extending existing classes but I'm still not fully convinced something like benchmarking, logging or mocking are not valid applications of inheritance. Discouraging inheritance is one thing, disallowing another. Maybe this needs to go to a separate thread but this RFC made me aware of this issue (and the different views people have about where PHP should go) again. Regards, - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php