Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DomCrawler] always pass base href to subcrawlers #16028

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
Oct 1, 2015

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Sep 30, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

Make sure that all relevant information is passed to created crawlers.
To avoid future regressions, this commit backports the approach taken by
@stof in #15934 to have a single place in the class that is responsible
to create subcrawler instances.

Make sure that all relevant information is passed to created crawlers.
To avoid future regressions, this commit backports the approach taken by
@stof in symfony#15934 to have a single place in the class that is responsible
to create subcrawler instances.
@@ -370,7 +370,7 @@ public function each(\Closure $closure)
*/
public function slice($offset = 0, $length = -1)
{
return new static(iterator_to_array(new \LimitIterator($this, $offset, $length)), $this->uri);
Copy link
Member

Choose a reason for hiding this comment

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

for reference, this is the place where the baseHref was missing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, in #15934 I asked to backport this to the 2.3 branch, but realised that the slice() method was introduced later. That's why I did not backport your changes to Symfony 2.3.

@stof
Copy link
Member

stof commented Sep 30, 2015

I'm 👍 on backporting this

@Tobion
Copy link
Contributor

Tobion commented Oct 1, 2015

👍

Status: Reviewed

@fabpot
Copy link
Member

fabpot commented Oct 1, 2015

Thank you @xabbuh.

@fabpot fabpot merged commit 3d9a748 into symfony:2.7 Oct 1, 2015
fabpot added a commit that referenced this pull request Oct 1, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] always pass base href to subcrawlers

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Make sure that all relevant information is passed to created crawlers.
To avoid future regressions, this commit backports the approach taken by
@stof in #15934 to have a single place in the class that is responsible
to create subcrawler instances.

Commits
-------

3d9a748 [DomCrawler] always pass base href to subcrawlers
@xabbuh xabbuh deleted the missing-base-href branch October 1, 2015 07:12
@fabpot fabpot mentioned this pull request Oct 27, 2015
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.

5 participants