File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,15 @@ BREAKING
2121Behavior Changes
2222================
2323
24+ Filter Execution Order
25+ ----------------------
26+
27+ The order in which Controller Filters are executed has changed. See
28+ :ref: `Upgrading Guide <upgrade-450-filter-execution-order >` for details.
29+
30+ Others
31+ ------
32+
2433- **Logger: ** The :php:func: `log_message() ` function and the logger methods in
2534 ``CodeIgniter\Log\Logger `` now do not return ``bool `` values. The return types
2635 have been fixed to ``void `` to follow the PSR-3 interface.
Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ will be passed in ``$arguments`` to the ``group`` filter's ``before()`` methods.
184184When the URI matches ``admin/users/*' ``, the array ``['users.manage'] ``
185185will be passed in ``$arguments `` to the ``permission `` filter's ``before() `` methods.
186186
187+ .. _filter-execution-order :
188+
187189Filter Execution Order
188190======================
189191
@@ -198,7 +200,8 @@ Filters are executed in the following order:
198200
199201.. note :: Prior to v4.5.0, the filters that are specified to a route
200202 (in **app/Config/Routes.php **) are executed before the filters specified in
201- **app/Config/Filters.php **.
203+ **app/Config/Filters.php **. See
204+ :ref: `Upgrading Guide <upgrade-450-filter-execution-order >` for details.
202205
203206******************
204207Confirming Filters
Original file line number Diff line number Diff line change @@ -25,6 +25,26 @@ Some method signature changes have been made. Classes that extend them should
2525update their APIs to reflect the changes. See :ref: `ChangeLog <v450-method-signature-changes >`
2626for details.
2727
28+ .. _upgrade-450-filter-execution-order :
29+
30+ Filter Execution Order
31+ ======================
32+
33+ The order in which Controller Filters are executed has changed.
34+
35+ Before Filters::
36+
37+ Previous: route → globals → methods → filters
38+ Now: globals → methods → filters → route
39+
40+ After Filters::
41+
42+ Previous: route → globals → filters
43+ Now: route → filters → globals
44+
45+ If you wish to maintain the same execution order as in previous versions, set
46+ ``true `` to ``Config\Feature::$oldFilterOrder ``. See also :ref: `filter-execution-order `.
47+
2848Removed Deprecated Items
2949========================
3050
You can’t perform that action at this time.
0 commit comments