Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Added additional tests to validate PSR-7 UriInterface implementation #66

Closed
wants to merge 1 commit into from
Closed

Added additional tests to validate PSR-7 UriInterface implementation #66

wants to merge 1 commit into from

Conversation

nyamsprod
Copy link
Contributor

The tests are added with an explanation in the docblock referencing PSR-7 and/or RFC3986 rules to explain the expected results.

These tests cover issue #65 I had submitted previously

IMHO none of the added tests should failed

The tests are added with an explanation in the docblock
referencing PSR-7 and/or RFC3986 rules to explain the
expected results
@weierophinney
Copy link
Member

@nyamsprod Question: how do you parse the URI, if not using parse_url()? Are you using a dedicated parser in league/uri? What kind of performance overhead does that add? (We have a parser in zend-http, though, based on the number of bugs it has had logged to it over the years, I think the approach may be dubious at best.)

Part of the reason I ask is because addressing the test failures may require a substantial amount of work to address. If you know of a parser that could be used as a dependency, that may help us in getting these addressed sooner rather than later.

@nyamsprod
Copy link
Contributor Author

@weierophinney I'm using a dedicated parser for the package UriParser. It is based on the provided RFC3986 regular expression. I have yet to for its overhead though.

@nyamsprod
Copy link
Contributor Author

I've quickly made this benchmark package to test both URI parser implementations hope you'll find it interesting. The results on my computer shows that the speed depends on the URI structure. But memory usage seems to indicate that League\Uri\UriParser consume less than the Zend\Uri\Uri parser.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants