refactor: remove deprecations in HTTP#10000
refactor: remove deprecations in HTTP#10000paulbalandan wants to merge 1 commit 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
| - ``CodeIgniter\HTTP\URI::$baseURL`` (deprecated since v4.4.0) | ||
| - ``CodeIgniter\HTTP\URI::setBaseURL()`` (deprecated since v4.4.0) | ||
| - ``CodeIgniter\HTTP\URI::getBaseURL()`` (deprecated since v4.4.0) | ||
| - ``CodeIgniter\HTTP\URI::setURI()`` (deprecated since v4.4.0) |
There was a problem hiding this comment.
The method was not deleted, but the scope was changed.
| - ``CodeIgniter\HTTP\URI::getBaseURL()`` (deprecated since v4.4.0) | ||
| - ``CodeIgniter\HTTP\URI::setURI()`` (deprecated since v4.4.0) | ||
| - ``CodeIgniter\HTTP\URI::setScheme()`` (deprecated since v4.4.0) | ||
| - ``CodeIgniter\HTTP\URI::refreshPath()`` (deprecated since v4.4.0) |
There was a problem hiding this comment.
The method (and some others) was not deleted, but the scope was changed.
| * See https://www.php-fig.org/psr/psr-17/#26-urifactoryinterface | ||
| */ | ||
| public function __construct(?string $uri = null) | ||
| public function __construct(?string $uri = null, bool $useRawQueryString = false) |
There was a problem hiding this comment.
may be remove null? In setUri() it just returns the current object.
if ($uri === null) {
return $this;
}There was a problem hiding this comment.
Do I need a test for a new argument?
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: