File tree Expand file tree Collapse file tree 4 files changed +41
-1
lines changed Expand file tree Collapse file tree 4 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ The following breaking changes have been made accordingly:
43
43
- ``TestException `` now extends ``CodeIgniter\Exceptions\LogicException ``
44
44
instead of ``CodeIgniter\Exceptions\CriticalError ``.
45
45
46
+ Filters Changes
47
+ ---------------
48
+
49
+ The ``Filters `` class has been changed to allow multiple runs of the same filter
50
+ with different arguments in before or after. See
51
+ :ref: `Upgrading Guide <upgrade-460-filters-changes >` for details.
52
+
46
53
.. _v460-interface-changes :
47
54
48
55
Interface Changes
@@ -106,6 +113,9 @@ The following new Exception interfaces have been added:
106
113
Commands
107
114
========
108
115
116
+ - The ``spark routes `` and ``spark filter:check `` commands now display filter
117
+ arguments.
118
+
109
119
Testing
110
120
=======
111
121
@@ -138,6 +148,9 @@ Helpers and Functions
138
148
Others
139
149
======
140
150
151
+ - **Filters: ** Now you can execute a filter more than once with the different
152
+ arguments in before or after.
153
+
141
154
***************
142
155
Message Changes
143
156
***************
@@ -176,6 +189,11 @@ The following changes have been made accordingly:
176
189
Deprecations
177
190
************
178
191
192
+ - **Filters: **
193
+ - The properties ``$arguments `` and ``$argumentsClass `` of ``Filters `` have
194
+ been deprecated. No longer used.
195
+ - The ``Filters::getArguments() `` method has been deprecated. No longer used.
196
+
179
197
**********
180
198
Bugs Fixed
181
199
**********
Original file line number Diff line number Diff line change @@ -226,6 +226,9 @@ will be passed in ``$arguments`` to the ``group`` filter's ``before()`` methods.
226
226
When the URI matches ``admin/users/*' ``, the array ``['users.manage'] ``
227
227
will be passed in ``$arguments `` to the ``permission `` filter's ``before() `` methods.
228
228
229
+ .. note :: Prior to v4.6.0, the same filter cannot be run multiple times with
230
+ different arguments.
231
+
229
232
.. _filter-execution-order :
230
233
231
234
Filter Execution Order
Original file line number Diff line number Diff line change @@ -589,7 +589,8 @@ The ``filter`` option passed to the outer ``group()`` are merged with the inner
589
589
The above code runs ``myfilter1:config `` for the route ``admin ``, and ``myfilter1:config ``
590
590
and ``myfilter2:region `` for the route ``admin/users/list ``.
591
591
592
- .. note :: The same filter cannot be run multiple times with different arguments.
592
+ .. note :: Prior to v4.6.0, the same filter cannot be run multiple times with
593
+ different arguments.
593
594
594
595
Any other overlapping options passed to the inner ``group() `` will overwrite their values.
595
596
Original file line number Diff line number Diff line change @@ -54,6 +54,24 @@ See :ref:`ChangeLog <v460-removed-deprecated-items>` for details.
54
54
Breaking Enhancements
55
55
*********************
56
56
57
+ .. _upgrade-460-filters-changes :
58
+
59
+ Filters Changes
60
+ ===============
61
+
62
+ The ``Filters `` class has been changed to allow multiple runs of the same filter
63
+ with different arguments in before or after.
64
+
65
+ If you are extending ``Filters ``, you will need to modify it to conform to the
66
+ following changes:
67
+
68
+ - The structure of the array properties ``$filters `` and ``$filtersClasses `` have
69
+ been changed.
70
+ - The properties ``$arguments `` and ``$argumentsClass `` are no longer used.
71
+ - ``Filters `` has been changed so that the same filter class is not instantiated
72
+ multiple times. If a filter class is used both before and after, the same instance
73
+ is used.
74
+
57
75
*************
58
76
Project Files
59
77
*************
You can’t perform that action at this time.
0 commit comments