Skip to content

XMLReader::$nodeType missing properties #8629

Closed
@verfriemelt-dot-org

Description

@verfriemelt-dot-org

Bug report

> var_dump(phpversion(), (new XMLReader)->nodeType);
string(5) "8.2.0"
int(0)

the same applies for at least localName

as seen here this will produces an error with phpstan and php8.2 but not with previous versions.
the phpstorm stub contains the property:

/**
 * The XMLReader extension is an XML Pull parser. The reader acts as a
 * [...]
 * @property-read int $nodeType The node type for the node
 * [...]
 */
class XMLReader

Code snippet that reproduces the problem

https://phpstan.org/r/7b94ed04-7dfb-4add-a191-79ff6d64f940

Expected output

Did PHPStan help you today? Did it make you happy in any way?

yeah, always makes me happy :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions