Merge branch '6.4' into 7.2

* 6.4:
  [DomCrawler] Replace parents() by ancestors()
This commit is contained in:
Javier Eguiluz
2025-06-02 08:40:57 +02:00

View File

@@ -10,11 +10,11 @@ Traversing
Like jQuery, the Crawler has methods to traverse the DOM of an HTML/XML
document. For example, the following finds all ``input[type=submit]`` elements,
selects the last one on the page, and then selects its immediate parent element::
selects the last one on the page, and then selects its immediate ancestor element::
$newCrawler = $crawler->filter('input[type=submit]')
->last()
->parents()
->ancestors()
->first()
;
@@ -36,8 +36,8 @@ Many other methods are also available:
All following siblings.
``previousAll()``
All preceding siblings.
``parents()``
Returns the parent nodes.
``ancestors()``
Returns the ancestor nodes.
``children()``
Returns children nodes.
``reduce($lambda)``