Skip to content

Make DOMNamedNodeMap generic #4211

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

Open
wants to merge 1 commit into
base: 2.1.x
Choose a base branch
from

Conversation

stefanfisk
Copy link

@stefanfisk stefanfisk force-pushed the issue/13365 branch 5 times, most recently from 470e9bb to 260df38 Compare August 6, 2025 18:12
@stefanfisk stefanfisk changed the title Fix 13365 Make DOMNamedNodeMap generic Aug 6, 2025
* @property-read int $length
*/
class DOMNamedNodeMap
class DOMNamedNodeMap implements Traversable, IteratorAggregate, Countable
Copy link
Contributor

@VincentLanglet VincentLanglet Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't need to implements both Traversable and IteratorAggregate in the stub.

See
https://github.com/JetBrains/phpstorm-stubs/blob/6c034ae018ed7ac2cacf2474f824aede73658afa/dom/dom_c.php#L1381

Copy link
Author

@stefanfisk stefanfisk Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VincentLanglet I just copied it from DOMNodeList at

class DOMNodeList implements Traversable, IteratorAggregate, Countable

Do you want me to fix DOMNodeList as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's done this way for DOMNodeList you can just ignore my remark I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOMElement::$attributes type is no longer generic
2 participants