Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DomCrawler] Allow using non-absolute base URIs#28035
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
javiereguiluz commentedJul 23, 2018
In the latest commit1f797ea I made the constructor argument optional, because this is probably what the issue reporter wanted in the first place. If we agree with this ... we should rebase into master as a new feature. |
javiereguiluz commentedJul 24, 2018
@stof do you agree that we should rebase this on |
stof commentedJul 24, 2018
We could indeed consider that a new feature rather than a bugfix. |
xabbuh commentedJul 24, 2018
IMO there is one downside with this new approach: Previously, you could safe call |
javiereguiluz commentedJul 25, 2018
@xabbuh you are right! I've refactored this to introduce the new feature without changing the current behavior much. Thanks! |
nicolas-grekas commentedJul 26, 2018
(rebase needed) |
| $this->currentUri =$currentUri; | ||
| $elementUriIsRelative =null ===parse_url(trim($this->getRawUri()),PHP_URL_SCHEME); | ||
| $baseUriIsAbsolute =\in_array(strtolower(substr($this->currentUri,0,4)),array('http','file')); |
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.
Should we usestrpos() here instead?
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.
It's the same code as in the older branches, so we know it works and I'd prefer to not change it 😅
fabpot commentedAug 2, 2018
Thank you@javiereguiluz. |
…reguiluz)This PR was squashed before being merged into the 4.2-dev branch (closes#28035).Discussion----------[DomCrawler] Allow using non-absolute base URIs| Q | A| ------------- | ---| Branch? | 2.8| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#12318| License | MIT| Doc PR | -@xabbuh@stof I implemented in this PR your comments from#12318Commits-------130119f [DomCrawler] Allow using non-absolute base URIs
@xabbuh@stof I implemented in this PR your comments from#12318