Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DomCrawler] Revert previous restriction, allow selection of every DOMNode object#17035

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
EdgarPE wants to merge7 commits intosymfony:2.8fromEdgarPE:domcrawler-select-domnodes-2.8
Closed

[DomCrawler] Revert previous restriction, allow selection of every DOMNode object#17035

EdgarPE wants to merge7 commits intosymfony:2.8fromEdgarPE:domcrawler-select-domnodes-2.8

Conversation

@EdgarPE
Copy link
Contributor

QA
Bug fix?no
New feature?yes, revert to previous behaviour
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#16933
LicenseMIT
Doc PR

This is a backport of PR#17021

@stof
Copy link
Member

you need to update the phpdoc of Crawler in a few place talking about DomElement though

Copy link
Contributor

Choose a reason for hiding this comment

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

Enclose the message in single quotes please.

@EdgarPE
Copy link
ContributorAuthor

Rebased changes. DomCrawler tests still pass.

Copy link
Member

Choose a reason for hiding this comment

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

Why are you adding a test without any assertion here ?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I wanted to test the deprecation notice, but it's out of scope of this PR, so just removed it.

@stof
Copy link
Member

👍

Copy link
Member

Choose a reason for hiding this comment

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

Imo the message is a bit misleading as you only check the type of the first element.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

What do you suggest on this? Because only the first node is used my suggestion would be to reword the Exception like this:

throw new \InvalidArgumentException(sprintf('The selected node should be instance of  DOMElement, "%s" found.', get_class($node)));

For the corresponding PHPDoc:

@throws \InvalidArgumentException If the current node list is empty or the selected node is not instance of DOMElement

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think that's better.

@jakzal
Copy link
Contributor

status: reviewed

@jakzaljakzal changed the titleBackport to 2.8 of [DomCrawler] Revert previous restriction, allow selection of every DOMNode object[DomCrawler] Revert previous restriction, allow selection of every DOMNode objectDec 23, 2015
@jakzal
Copy link
Contributor

Thanks@EdgarPE for your excellent work!

jakzal added a commit that referenced this pull requestDec 23, 2015
…ion of every DOMNode object (EdgarPE)This PR was squashed before being merged into the 2.8 branch (closes#17035).Discussion----------[DomCrawler] Revert previous restriction, allow selection of every DOMNode object| Q             | A| ------------- | ---| Bug fix?      | no| New feature?  | yes, revert to previous behaviour| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#16933| License       | MIT| Doc PR        |This is a backport of PR#17021Commits-------d2872a3 [DomCrawler] Revert previous restriction, allow selection of every DOMNode object
@jakzal
Copy link
Contributor

Looks like gh didn't close this PR automatically.

@jakzaljakzal closed thisDec 23, 2015
This was referencedDec 26, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@EdgarPE@stof@jakzal@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp