-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DomCrawler] Added argument $default
to method Crawler::attr()
#51368
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
Conversation
Do we really need this? My feeling is that we now have the |
I'd prefer to use native |
Yes we need, because setting default value also prevents throwing exception when node does not exist (methods text() and html() act similar). So this code:
can be simplifies to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. Works for me.
Please also update the UPGRADE-6.4.md file, and please rebase to get rid of merge commits (PRs shouldn't contain any). |
$default
to method ->attr()
like ->text()
and ->html()
have.$default
to method Crawler::attr()
$default
to method Crawler::attr()
$default
to method Crawler::attr()
Thank you @Rastishka. |
Added argument
$default
to method->attr()
like->text()
and->html()
have.