-
Notifications
You must be signed in to change notification settings - Fork 357
Fix URI generic syntax delimit path components by slash ("/
")
#105
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
Conversation
This first commit at least fixes the issue for me on a windows test-system. The issue also highlighted wrong usage of |
For reference: URI uses the slash (" If you follow any of these standards, there are existing components that do resolvement of URI parts, for example, you should be able to use Net_URL2 which is pretty robust. |
Two little refactoring commits on the house to align and remove some duplicate code. |
@justinrainbow same here. |
@hakre would you please rebase the latest? |
c709553
to
43f7a94
Compare
@bighappyface: Rebased + refreshed and a little squashed. |
My bad, it was all removed in 43f7a94 |
I think this is a solid refactor and dedup. Thank you. +1 I will merge this with another +1 from the community. |
@bighappyface: The curlies have been squared now. Merge like you see fit, but don't let it rot :) |
@hakre I am sure one of the other consumers with PRs will help review. Quid pro quo 😄 |
@bighappyface: Was just pushing a bit because this PR was laying around for quite some time. Just let me know if it needs refresh again or there's anything. |
@bighappyface sorry, don't know this repo |
@loucho @onlinesid would you mind reviewing this PR for @hakre? |
+1 👍 seems to be working and i like the corrections to the phpdocs |
@loucho thanks for the help! @hakre I am ready to merge this but I didn't expect such a fast turnaround for the review. I just pushed out 1.4.1 based on #132 today, and should have included this PR in it. The only other PR I see that is close is the work being done on #134. Would you both help us determine a path forward on that work? If it looks like we will spend much more time there, I will merge this today and bump to 1.4.2. If we can make progress on that end soon, it would be nice to wait and roll multiple updates into a single new version. Thoughts? |
@bighappyface: I'd say #134 can greatly benefit from rebasing. I've done the rebasing for the PR here as well. Should I squash the changes here together into one commit? |
I think a single commit is best, but the rebase you have performed is great. I agree with the rebase for #134 and we can take care of that up once we determine how to tackle better validation error messaging. |
IMO all PRs should contain one commit per author. |
@@ -72,7 +72,7 @@ public function generate(array $components) | |||
* Resolves a URI | |||
* | |||
* @param string $uri Absolute or relative | |||
* @param type $baseUri Optional base URI | |||
* @param string $baseUri Optional base URI | |||
* @return string Absolute URI |
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.
return annotation should be separated due to PHPDoc
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.
more context.
* Guarantee the correct media type was encountered | ||
* | ||
* @throws InvalidSchemaMediaTypeException | ||
* @param UriRetrieverInterface $uriRetriever |
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.
then parameter should be typehinted
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.
done.
This is a fix, but no new tests were added... |
@keradus I think we are good here. The test suite provides regression testing for this refactor: |
and now the docs is lying ;) |
Just to show we are not good yet here ;P |
Parts of justinrainbow/json-schema are using the backslash ("`\`") in error on occasion. This fixes the issue in **UriResolver** as well as in **UriRetriever**. With this commit, the *overall* usage of that DIRECTORY_SEPARATOR constant has been redacted out of this project. Additionally in a refactoring duplicate code has been removed from the classes afterwards and some minor CS fixes have been applied.
Just squashed into one commit. Also went through the comments by @keradus - thank you for taking the time to review. Technically it's correct about the test but I also think it's OK to have this lifted as this PR is mainly maintenance and low-level improvement today. The original fix isn't part of it any longer 100%. It just has over-lived itself in part. |
@hakre thank you for the squash and response to feedback. Let's merge this in and include it in the next version bump. |
Fix URI generic syntax delimit path components by slash ("`/`")
@bighappyface ACK, cleared here locally. If you have some other older rotten PR you'd like to see refreshed, let me know. |
Parts of justinrainbow/json-schema are using the backslash ("
\
") inerror on occasion.