-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Error if request URI provides relative path #269
Conversation
The build is failing but it seems to have been failing for some time. Tests are segfaulting for some reason under 7.2 even locally (I failed to understand why) but run okay on 7.3 and 7.4. I've re-checked that at least my tests are running okay on all three versions. |
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.
The same check needs to be done in Http2Connection
, should we put the check into DefaultConnectionFactory
or duplicate it into Http2Connection
?
$uri->method('withPort')->willReturnSelf(); | ||
$uri->method('withQuery')->willReturnSelf(); | ||
$uri->method('withFragment')->willReturnSelf(); | ||
$uri->method('__toString')->willReturn('http://localhost/foo'); |
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.
Do we need a mock here or can we just use league/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.
We need mock because league/uri
doesn't allow relative paths and I don't think it's a good idea to require-dev another implementation that does allow them (laminas/laminas-diactoros
, for example).
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.
That's good to know, thanks! I wouldn't have a problem with requiring laminas/laminas-diactoros
in require-dev
.
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.
That's not a big problem, but they can decide to change this behavior in future - I think it's better not to rely on it. Anyway, it's just one small negative corner-case.
Co-authored-by: Niklas Keller <me@kelunik.com>
If you rebase onto |
Hmm, I need to take a closer look... |
I think it's wise to make checks just before contract protects us; and in our case contract of |
Seems that some tests are flaky. |
Thanks! |
No description provided.