You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
InaccessibleProperty and mixed|string for a private or protected property when the class has __get() and a @mixin that declares it #14132
What Psalm reports / does InaccessibleProperty on lines 21 and 22, and $_p / $_q are mixed|string. Host has a private $p and a protected $q, a __get(), and @mixin Mx, where Mx has public int $p and int $q. Both reads come from outside the class.
What you expected
No issue, and int for both. Outside the class the property is not accessible, so PHP calls Host::__get(), which is what the @mixin documents as forwarding to Mx. PHPStan 2.3 resolves both reads to int without an error. This is the property counterpart of #13727, which did the same for an inaccessible method (__call() + @mixin); that case is int on psalm.dev now, only the property fetch still stops at the inaccessible declaration.
Psalm version, PHP version
psalm.dev 7.x-dev (dev-master@ce04a73), PHP 8.3
changed the title [-]InaccessibleProperty and mixed|string for a private or protected property when the class has __get() and a @mixin that declares it[/-][+]InaccessibleProperty and `mixed|string` for a private or protected property when the class has `__get()` and a `@mixin` that declares it[/+]on Nov 17, 2026
Activity
psalm-github-bot commentedon Nov 17, 2026
I found these snippets:
https://psalm.dev/r/b19711e6cc
[-]InaccessibleProperty and mixed|string for a private or protected property when the class has __get() and a @mixin that declares it[/-][+]InaccessibleProperty and `mixed|string` for a private or protected property when the class has `__get()` and a `@mixin` that declares it[/+]fix(mixin): an inaccessible property is read from the mixin through _…