# InaccessibleProperty

Emitted when attempting to access a protected/private property from outside its available scope

```php
<?php

class A {
    /** @return string */
    protected $foo;
}
echo (new A)->foo;
```

It is also emitted when writing to a property whose asymmetric set visibility (PHP 8.4) is not accessible
from the current context:

```php
<?php

class A {
    public private(set) string $foo = 'bar';
}

$a = new A();
$a->foo = 'baz';
```

It is also emitted when a `readonly` property is written anywhere but in a constructor (or `__clone`, `unserialize`) of its class:

```php
<?php

class Test {}

class A {
    public function __construct(private readonly Test $test) {}

    public function change(Test $test): void {
        $this->test = $test; // InaccessibleProperty: A::$test is marked readonly
    }
}
```
