Skip to content

Commit e19228a

Browse files
committed
docs: improve Upgrading 4.1.5 page format
1 parent df15a3f commit e19228a

1 file changed

Lines changed: 40 additions & 17 deletions

File tree

user_guide_src/source/installation/upgrade_415.rst

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,24 @@
22
Upgrading from 4.1.4 to 4.1.5
33
#############################
44

5-
**Changes for set() method in BaseBuilder and Model class**
5+
.. contents::
6+
:local:
7+
:depth: 1
8+
9+
Breaking Changes
10+
================
11+
12+
Changes for set() method in BaseBuilder and Model class
13+
-------------------------------------------------------
614

715
The casting for the ``$value`` parameter has been removed to fix a bug where passing parameters as array and string
816
to the ``set()`` method were handled differently. If you extended the ``BaseBuilder`` class or ``Model`` class yourself
917
and modified the ``set()`` method, then you need to change its definition from
1018
``public function set($key, ?string $value = '', ?bool $escape = null)`` to
1119
``public function set($key, $value = '', ?bool $escape = null)``.
1220

13-
**Session DatabaseHandler's database table change**
21+
Session DatabaseHandler's database table change
22+
-----------------------------------------------
1423

1524
The types of the following columns in the session table have been changed for optimization.
1625

@@ -26,7 +35,29 @@ Update the definition of the session table. See the :doc:`/libraries/sessions` f
2635
The change was introduced in v4.1.2. But due to `a bug <https://github.com/codeigniter4/CodeIgniter4/issues/4807>`_,
2736
the DatabaseHandler Driver did not work properly.
2837

29-
**Multiple filters for a route**
38+
CSRF Protection
39+
---------------
40+
41+
Because of a bug fix,
42+
now CSRF protection works on not only **POST** but also **PUT/PATCH/DELETE** requests when CSRF filter is applied.
43+
44+
When you use **PUT/PATCH/DELETE** requests, you need to send CSRF token. Or remove the CSRF filter
45+
for such requests if you don't need CSRF protection for them.
46+
47+
If you want the same behavior as the previous version, set the CSRF filter like the following in **app/Config/Filters.php**::
48+
49+
public $methods = [
50+
'get' => ['csrf'],
51+
'post' => ['csrf'],
52+
];
53+
54+
Protecting **GET** method needs only when you use ``form_open()`` auto-generation of CSRF field.
55+
56+
Breaking Enhancements
57+
=====================
58+
59+
Multiple filters for a route
60+
----------------------------
3061

3162
A new feature to set multiple filters for a route.
3263

@@ -54,19 +85,11 @@ The following methods and a property have been deprecated:
5485

5586
See *Applying Filters* in :doc:`Routing </incoming/routing>` for the functionality.
5687

57-
**CSRF Protection**
58-
59-
Because of a bug fix,
60-
now CSRF protection works on not only **POST** but also **PUT/PATCH/DELETE** requests when CSRF filter is applied.
61-
62-
When you use **PUT/PATCH/DELETE** requests, you need to send CSRF token. Or remove the CSRF filter
63-
for such requests if you don't need CSRF protection for them.
64-
65-
If you want the same behavior as the previous version, set the CSRF filter like the following in **app/Config/Filters.php**::
88+
Project Files
89+
=============
6690

67-
public $methods = [
68-
'get' => ['csrf'],
69-
'post' => ['csrf'],
70-
];
91+
Content Changes
92+
---------------
7193

72-
Protecting **GET** method needs only when you use ``form_open()`` auto-generation of CSRF field.
94+
All Changes
95+
-----------

0 commit comments

Comments
 (0)