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

Appearance settings

[BrowserKit] Use a regex to guess if a URI is absolute or not. #14734

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

Closed
wants to merge 1 commit into from
Closed

[BrowserKit] Use a regex to guess if a URI is absolute or not. #14734

wants to merge 1 commit into from

Conversation

dosten
Copy link
Contributor

@dosten dosten commented May 23, 2015

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

@jakzal
Copy link
Contributor

jakzal commented May 28, 2015

You'll need to add a test :)

@Tobion
Copy link
Contributor

Tobion commented May 28, 2015

Using parse_url would be better IMO

@dosten
Copy link
Contributor Author

dosten commented May 30, 2015

@Tobion If i use parse_url the code should be:

if (in_array(parse_url($uri, PHP_URL_SCHEME), array('http', 'https'))) {
    return $uri;
}

@jakzal How can i test a protected method? via Reflection?

@dosten
Copy link
Contributor Author

dosten commented May 30, 2015

@jakzal
Copy link
Contributor

jakzal commented May 30, 2015

@jakzal How can i test a protected method? via Reflection?

You don't. You should test its behaviour through a public method.

@fabpot
Copy link
Member

fabpot commented Jun 1, 2015

Closing in favor of #14785 (it has tests).

@fabpot fabpot closed this Jun 1, 2015
@dosten dosten deleted the regex-absolute-url-guesser branch June 1, 2015 15:48
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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.