Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions user_guide_src/source/installation/upgrade_405.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Please refer to the upgrade instructions corresponding to your installation meth

CodeIgniter 4.0.5 introduces a setting for the cookie SameSite attribute. Prior versions did not set this
attribute at all. The default setting for cookies is now `Lax`. This will affect how cookies are handled in
cross-domain contexts and you may need to adjust this setting in your projects. Separate settings in `app/Config/App.php`
cross-domain contexts and you may need to adjust this setting in your projects. Separate settings in **app/Config/App.php**
exists for Response cookies and for CSRF cookies.

For additional information, see `MDN Web Docs <https://developer.mozilla.org/pl/docs/Web/HTTP/Headers/Set-Cookie/SameSite>`_.
Expand All @@ -32,8 +32,8 @@ to all classes that extend ``Message`` as well: ``Request``, ``Response`` and th

Additional related deprecations from the HTTP layer:

* ``Message::isJSON``: Check the "Content-Type" header directly
* ``Request[Interface]::isValidIP``: Use the Validation class with ``valid_ip``
* ``Message::isJSON()``: Check the "Content-Type" header directly
* ``Request[Interface]::isValidIP()``: Use the Validation class with ``valid_ip``
* ``Request[Interface]::getMethod()``: The ``$upper`` parameter will be removed, use str_to_upper()
* ``Request[Trait]::$ipAddress``: This property will become private
* ``Request::$proxyIPs``: This property will be removed; access ``config('App')->proxyIPs`` directly
Expand All @@ -44,26 +44,26 @@ Additional related deprecations from the HTTP layer:
**ResponseInterface**

This interface intends to include the necessary methods for any framework-compatible response class.
A number of methods expected by the framework were missing and have noe been added. If you use any
A number of methods expected by the framework were missing and have now been added. If you use any
classes the implement ``ResponseInterface`` directly they will need to be compatible with the
updated requirements. These methods are as follows:

* ``setLastModified($date);``
* ``setLink(PagerInterface $pager);``
* ``setJSON($body, bool $unencoded = false);``
* ``getJSON();``
* ``setXML($body);``
* ``getXML();``
* ``send();``
* ``sendHeaders();``
* ``sendBody();``
* ``setCookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = false, $httponly = false, $samesite = null);``
* ``hasCookie(string $name, string $value = null, string $prefix = ''): bool;``
* ``getCookie(string $name = null, string $prefix = '');``
* ``deleteCookie(string $name = '', string $domain = '', string $path = '/', string $prefix = '');``
* ``getCookies();``
* ``redirect(string $uri, string $method = 'auto', int $code = null);``
* ``download(string $filename = '', $data = '', bool $setMime = false);``
* ``setLastModified($date)``
* ``setLink(PagerInterface $pager)``
* ``setJSON($body, bool $unencoded = false)``
* ``getJSON()``
* ``setXML($body)``
* ``getXML()``
* ``send()``
* ``sendHeaders()``
* ``sendBody()``
* ``setCookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = false, $httponly = false, $samesite = null)``
* ``hasCookie(string $name, string $value = null, string $prefix = ''): bool``
* ``getCookie(string $name = null, string $prefix = '')``
* ``deleteCookie(string $name = '', string $domain = '', string $path = '/', string $prefix = '')``
* ``getCookies()``
* ``redirect(string $uri, string $method = 'auto', int $code = null)``
* ``download(string $filename = '', $data = '', bool $setMime = false)``

To facilitate use of this interface these methods have been moved from the framework's ``Response`` into a ``ResponseTrait``
which you may use, and ``DownloadResponse`` now extends ``Response`` directly to ensure maximum compatibility.
Expand Down