-
Notifications
You must be signed in to change notification settings - Fork 45
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
Construction of a Uri object #2
Comments
I prefer |
What @tuupola said |
Done. |
raigu
added a commit
to raigu/Slim-Psr7
that referenced
this issue
Apr 7, 2021
Line UploadedFile.php ------ ----------------------------------------------------------------------------------------------- 175 Parameter slimphp#1 $source of function stream_copy_to_stream expects resource, resource|null given. 175 Parameter slimphp#2 $dest of function stream_copy_to_stream expects resource, resource|false given.
raigu
added a commit
to raigu/Slim-Psr7
that referenced
this issue
Apr 7, 2021
Line UploadedFile.php ------ ---------------------------------------------------------------------------------------------- 179 Parameter slimphp#2 $dest of function stream_copy_to_stream expects resource, resource|false given. 181 Parameter slimphp#1 $fp of function fclose expects resource, resource|false given. ------ ---------------------------------------------------------------------------------------------- Had to force to skip target writability test in order to conduct a test that PHPStan required in a way that the 100% code coverage would be remain intact.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How should we construct a
Uri
object?Our current constructor is:
Should it be changed?
I think that the most common use-case is that the user has a string representation of a URI (e.g. "http://example.com/foo") & currently we use a factory called
createFromString
for this case.Should we update the way we create
Uri
s for Slim 4? These are the choices for construction of aUri
:$uri = new Uri('http', 'example.com', '/foo'):
(as current)$uri = new Uri("http://example.com/foo"):
(constructor takes a string)$uri = Uri::createFromString("http://example.com.foo"):
(static factory inUri
class)Note that we also want to support the upcoming http-interop's factories (PSR-17), so we'll also have this way to create a
Uri
from a string:$uri = UriFactory::createUri("http://example.com/foo");
Any preferences to how we should create
Uri
s in addition toUriFactory::createUri()
?The text was updated successfully, but these errors were encountered: