refactor: remove deprecations in HTTP#10000
refactor: remove deprecations in HTTP#10000paulbalandan wants to merge 4 commits intocodeigniter4:4.8from
Conversation
Haha, love the dedication 😆 I'm a little concerned about removing |
The deprecation was made in #7252 , mainly because it's not in PSR-7. Do you mean to "un-deprecate" it? |
|
Well, the reason in the comment ("Method not in PSR-7") isn't very fortunate, because PSR-7 allows extra methods. The real problem is immutability and hidden behavioral state. Since |
|
Okay, I'll retain it and add a hard deprecation notice on it. For the |
|
Yes, thank you! |
This comment was marked as resolved.
This comment was marked as resolved.
dafeec6 to
b78452e
Compare
b78452e to
86330c2
Compare
This comment was marked as resolved.
This comment was marked as resolved.
86330c2 to
8b51137
Compare
8b51137 to
6de3bf2
Compare
michalsn
left a comment
There was a problem hiding this comment.
Everything looks great, thanks!
One tiny thing, since we removed setScheme() method, we should also replace it with withScheme() in the user guide example: user_guide_src/source/libraries/uri/008.php
6de3bf2 to
1a3aa61
Compare
1a3aa61 to
18953ec
Compare
18953ec to
7367826
Compare
system/HTTP/URI.php
Outdated
| */ | ||
| $relative = new self(); | ||
| $relative->setURI($uri); | ||
| $relative = new self($uri); |
There was a problem hiding this comment.
| $relative = new self($uri); | |
| $relative = new self($uri, $this->rawQueryString); |
Consider adding this test:
public function testGetPreservesDottedQueryKeysFromBaseURI(): void
{
$request = $this->getRequest(['baseURI' => 'https://api.example.com/resource?foo.bar=baz']);
$request->get('');
$options = $request->curl_options;
$this->assertSame('https://api.example.com/resource?foo.bar=baz', $options[CURLOPT_URL]);
}
Description
Sending this early to get the
#10000slot. 😂This is not yet complete, but initially there are quite breaking changes:
Removed the deprecated assumption that URIs with the same host as baseURL should be relative to the project's configuration (deprecated by Internal URI handling #4646 and reinforced in fix: forceGlobalSecureRequests break URI schemes other than HTTP #5730)URI::setSilent()is removed, meaning it will always throw exceptions on invalid URIs instead of continuing.Checklist: