Skip to content

DOMElement::$attributes type is no longer generic #13365

@stefanfisk

Description

@stefanfisk

Bug report

In 2.1.17 the type of DOMElement::$attributes was (DOMNamedNodeMap&iterable<DOMAttr>)|null. Since 2.1.18 it is stubbed to DOMNamedNodeMap.

Code snippet that reproduces the problem

https://phpstan.org/r/84b90d2f-3b20-490c-aa01-ce0f34ee8fb0

Expected output

No errors.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions