Skip to content

[DomCrawler] deprecate parents() in favor of ancestors() #39684

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

Merged
merged 1 commit into from
Jan 3, 2021

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jan 2, 2021

Q A
Branch? 5.x
Bug fix? no
New feature? yes
Deprecations? yes
Tickets Fix #26432
License MIT
Doc PR

@fabpot
Copy link
Member

fabpot commented Jan 3, 2021

Thank you @xabbuh.

*
* @return static
*
* @throws \InvalidArgumentException When current node is empty
*/
public function parents()
{
@trigger_deprecation('symfony/dom-crawler', '5.3', sprintf('The %s() method is deprecated, use ancestors() instead.', __METHOD__));
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK the @ isnt needed

Copy link
Member

Choose a reason for hiding this comment

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

fixed in e970027
good catch, thank you!

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you @chalasr!

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

Successfully merging this pull request may close these issues.

[DomCrawler] Inconsistency between children and parents
8 participants