Skip to content
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

PHP 8.2: property_exists on parent class gives false positive #8727

Closed
levu42 opened this issue Jan 18, 2023 · 1 comment
Closed

PHP 8.2: property_exists on parent class gives false positive #8727

levu42 opened this issue Jan 18, 2023 · 1 comment

Comments

@levu42
Copy link

levu42 commented Jan 18, 2023

Bug report

When I use property_exists() on a parent class, it assumes that it's always used on that class, not possibly on a child class. That should only be the case in private methods, not in protected & public.

For some reason, it does not seem to give any error on PHP8.1, only 8.2, according to the PHPStan playground.

Code snippet that reproduces the problem

https://phpstan.org/r/04888761-38fb-471c-9e6c-2fd61357ff52

Expected output

No error

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant