-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#242Description
Bug report
We are extending DOMDocument we a custom wrapper that adds all sorts of convenience functionality.
The latest PHPStan v0.12.28 throws errors though that seem incorrect, and didn't previously get flagged:
The documentElement is public according to the PHP Docs, and the code works as expected.
Any usage of the $documentElement property in our code base triggers this, even across packages. Here's one example of code that produces this error:

Code snippet that reproduces the problem
I tried replicating the issue here, but couldn't get the same error to be thrown: https://phpstan.org/r/02668645-c6b7-43d3-8c34-d41d6937e253
Expected output
Using the DOMDocument::$documentElement public property from an extending child class shouldn't throw an error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
