22Upgrading 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
715The casting for the ``$value `` parameter has been removed to fix a bug where passing parameters as array and string
816to the ``set() `` method were handled differently. If you extended the ``BaseBuilder `` class or ``Model `` class yourself
917and 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
1524The 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
2635The change was introduced in v4.1.2. But due to `a bug <https://github.com/codeigniter4/CodeIgniter4/issues/4807 >`_,
2736the 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
3162A new feature to set multiple filters for a route.
3263
@@ -54,19 +85,11 @@ The following methods and a property have been deprecated:
5485
5586See *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