-
Notifications
You must be signed in to change notification settings - Fork 49
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
Guesser for UriFactory #3
Comments
Where would it be necessary? By definition message factories accept string or UriInterface, so URIs are converted to an UriInterface by the message factory which means that you will never need to create an UriInterface object directly. What use case can you imagine? Or is it for the sake of completeness? If so, StreamFactory implementations as well? (The message factory contract package has an interface for Messages, Uris, Streams as well) |
Use case: an object that needs to perform HTTP requests (using php-http/adapter) and that you can set a base URI on (that will be used for any of the requests from that object). Instead of parsing and validating that URI on your own it makes sense to use any of the PSR-7 libraries that must be available anyway to create the request objects. I could of course delay the base URI validation until I create a message object from it, but that may be a bit late. If you agree on the usefulness, I can open a PR. |
Valid point. Would you like to provide a PR or let me do the hard copy-pasting? 😉 |
I was already copy-pasting it, so I’ll submit it in a minute. |
Cool 👍 |
And probably UriFactory implementations for Guzzle and Diactoros?
The text was updated successfully, but these errors were encountered: