Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | all |
According to the documentation:
Get all the child or parent nodes:
$crawler->filter('body')->children();
$crawler->filter('body > p')->parents();
However, children()
returns only direct children (not grandchildren...), while parents()
returns all ancestors (including grandparents...).
Maybe it's more a docs issue than a code issue? Anyway it looks weird to me that methods with similar names have a different behavior.