-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
DomCrawler parents only on first node of selection #18723
Comments
All other methods only work on the first node of the current selection. Adding a method that would work with all nodes from the selection might be confusing. So I am 👎 on this suggestion. |
@xabbuh i did a quick count, seems that 13 of the 53 methods have |
@flip111 Well, we can of course update docblocks if there are some which are not clear enough. |
Anything to do here since the related PR was rejected? |
Accept or reject the issue on principle, we can think of implementation later. |
Thank you for this suggestion. |
Hello? This issue is about to be closed if nobody replies. |
. |
Thank you for this suggestion. |
Just a quick reminder to make a comment on this. If I don't hear anything I'll close this. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
The DomCrawler seems to take the first node and traverse up the tree until the root node. But i think that the selection can have different parents, when i saw the function description i would expect it gets the parent of each node in the selection. So with 5 nodes selected i would get 5 parents, of which some could be the same parent (an array of 5 references of which some references to the same object). My suggestion would be to introduce another method with the functionality just described. About naming the methods i'm not sure yet.'
symfony/src/Symfony/Component/DomCrawler/Crawler.php
Lines 469 to 492 in b85ab60
The text was updated successfully, but these errors were encountered: