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
| @trigger_error(sprintf('The %s method is deprecated and will be removed in CodeIgniter 5.0.', __METHOD__), E_USER_DEPRECATED); | ||
|
|
There was a problem hiding this comment.
There is one problem with this: we use this method in Pager::calculateCurrentPage(). In practice, that means normal pagination will now emit deprecation notices.
| { | ||
| if (array_key_exists('baseURI', $options)) { | ||
| $this->baseURI = $this->baseURI->setURI($options['baseURI']); | ||
| $this->baseURI = new URI($options['baseURI']); |
There was a problem hiding this comment.
This is also problematic. In the constructor, we call $uri->useRawQueryString(), which prevents the use of parse_str(). This is important because parse_str() would modify query parameters - for example, converting http://example.com/?foo.bar=baz into foo_bar=baz.
| - **HTTP:** Removed the following properties and methods deprecated: | ||
| - ``CodeIgniter\HTTP\Message::getHeaders()`` (deprecated since v4.0.5) | ||
| - ``CodeIgniter\HTTP\Message::getHeader()`` (deprecated since v4.0.5) | ||
| - ``CodeIgniter\HTTP\Request::setMethod()`` (deprecated since v4.0.5) |
There was a problem hiding this comment.
Because of inheritance, this doesn't seem entirely true, as setMethod() is still available in the OutgoingRequest class.
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: