New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive: Access to private property $root of parent class Foo. #2435
Comments
Thanks. Proof that it works: https://3v4l.org/GH1v2 |
@jkufner After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
+5: Property Foo::$root is never written, only read.
8: Access to private property $root of parent class Foo. Full report
|
@jkufner After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-8: Access to private property $root of parent class Foo.
+8: Access to private property $root of parent class Foo.
+5: Property Foo::$root is never written, only read. Full report
|
@jkufner After the latest push in 1.9.x, PHPStan now reports different result with your code snippet: @@ @@
-8: Access to private property $root of parent class Foo.
+5: Property Foo::$root is never written, only read. Full report
|
@jkufner After the latest push in 1.9.x, PHPStan now reports different result with your code snippet: @@ @@
-8: Access to private property $root of parent class Foo.
+5: Property Foo::$root is never written, only read. Full report
|
@jkufner After the latest push in 1.9.x, PHPStan now reports different result with your code snippet: @@ @@
-8: Access to private property $root of parent class Foo.
+5: Property Foo::$root is never written, only read. Full report
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
Accessing private property of inherited class from parent class (where the property is defined) is valid, but PHPStan does not like it.
Code snippet that reproduces the problem
https://phpstan.org/r/2c1e2424-3b4d-4a31-aca7-0e8c74633a86
Expected output
The code is fine. PHPStan should be quiet.
The text was updated successfully, but these errors were encountered: