Hi

On 5/29/24 21:15, Larry Garfield wrote:
* We've brought back the abbreviated form, as public-read, something else set 
is the most common use case.

The most common use case is that 'get' and 'set' are symmetric. Any divergence from that should stand out and I think that the hamming distance between

    protected string $foo;

and

    protected(set) string $foo;

is too small.

Other than that the proposal looks good to me. Ship it.

------

One note regarding the text. You already confirmed to me in private that:

    class Foo {
        private $dontTouchMe;
    }

    $backdoor = function ($key, $value) { $this->{$key} = $value; };

    $f = new Foo();
    $backdoor->call($f, 'dontTouchMe', 'butIDid');
    var_dump($f);

would work as expected with aviz. It would make sense to explicitly spell that out, just like it's explicitly spelled out that `ReflectionProperty::setValue()` works.

Best regards
Tim Düsterhus

Reply via email to