On 10/9/24 5:01 PM, Valentin Udaltsov wrote:
While not explicitly stated in changelogs, this was a BC break,
because a changed semantic of smth that existed before is a BC break.

Since readonly was only introduced in 8.1 this wasn't a BC break. You couldn't have a readonly property before so no pre-existing code would break.

Did it break anything? Of course it did! See:

Again, none of these would break if using 8.0 code. They broke because someone added a PHP 8.1 readonly property to existing code and then tried reflecting/hydrating/serializing it with code that was only tested on 8.0.

Now what _could_ be a BC break is when they made a load of internal PHP properties readonly but afaik that only happened on virtual properties that behaved that way already (Think DOMNode stuff)

While I agree that `is(Public|Protected|Private)(Get|Set)` is a clearer solution, nothing about the current implementation breaks BC.

- Jonathan

Reply via email to