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

Invalid error: Access to an undefined properties in XMLParser (nodeType, name and isEmptyElement) #9813

Closed
k00ni opened this issue Aug 28, 2023 · 3 comments

Comments

@k00ni
Copy link

k00ni commented Aug 28, 2023

Bug report

A subclass of XMLParser must have the following properties re-defined or PHPStan will complain:

  • nodeType
  • name
  • isEmptyElement

According to PHP documentation, these properties are public and already defined in XMLParser class.

My test setup uses PHP 8.2.

Code snippet that reproduces the problem

https://phpstan.org/r/3471ddc8-f42e-499a-92a7-3a730bf5b78c

Expected output

No error, because properties are defined in mother class already.

@ondrejmirtes
Copy link
Member

Duplicate of #8629

@k00ni
Copy link
Author

k00ni commented Aug 28, 2023

Alright, I checked open issues before, but only searched for "XMLParser" and not "XMLReader", as in #8629.

@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 Sep 29, 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

2 participants