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

Fix return type of DOMXPath::query #2842

Closed
wants to merge 1 commit into from
Closed

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Dec 23, 2023

This can also return namespace nodes, which are not a child class of DOMNode.

analog vimeo/psalm#10443

@staabm staabm marked this pull request as ready for review December 23, 2023 16:28
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes
Copy link
Member

Please show an example on 3v4l.org with examples of using this method and the cases where it returns different objects as stated in this PR. I'm worried of typical problems like that in 99 % of cases this is going to return what's already stated in the file, and this change is going to report these 99 % of cases for the sake of correctness for the 1 %.

@staabm
Copy link
Contributor Author

staabm commented Dec 30, 2023

https://3v4l.org/GpOJA

@ondrejmirtes
Copy link
Member

So only a query that starts with namespace is going to return that?

@nielsdos
Copy link

So only a query that starts with namespace is going to return that?

Only queries that explicitly request namespace nodes return that.

@ondrejmirtes
Copy link
Member

Yeah so this PR isn't really worth it in the current form.

@staabm staabm deleted the patch-2 branch December 30, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants