File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ BREAKING
2121Behavior Changes
2222================
2323
24+ Nested Route Groups and Options
25+ -------------------------------
26+
27+ Due to a bug fix, the behavior has changed so that options passed to the outer
28+ ``group() `` are merged with the options of the inner ``group() ``.
29+ See :ref: `Upgrading Guide <upgrade-450-nested-route-groups-and-options >` for details.
30+
31+ Others
32+ ------
33+
2434- **Logger: ** The :php:func: `log_message() ` function and the logger methods in
2535 ``CodeIgniter\Log\Logger `` now do not return ``bool `` values. The return types
2636 have been fixed to ``void `` to follow the PSR-3 interface.
Original file line number Diff line number Diff line change @@ -535,6 +535,8 @@ given route config options:
535535
536536.. literalinclude :: routing/027.php
537537
538+ .. _routing-nesting-groups :
539+
538540Nesting Groups
539541==============
540542
Original file line number Diff line number Diff line change @@ -18,6 +18,37 @@ Mandatory File Changes
1818Breaking Changes
1919****************
2020
21+ .. _upgrade-450-nested-route-groups-and-options :
22+
23+ Nested Route Groups and Options
24+ ===============================
25+
26+ A bug that prevented options passed to outer ``group() `` from being merged with
27+ options in inner ``group() `` has been fixed.
28+
29+ Check and correct your route configuration as it could change the values of the
30+ options applied.
31+
32+ For example,
33+
34+ .. code-block :: php
35+
36+ $routes->group('admin', ['filter' => 'csrf'], static function ($routes) {
37+ $routes->get('/', static function () {
38+ // ...
39+ });
40+
41+ $routes->group('users', ['namespace' => 'Users'], static function ($routes) {
42+ $routes->get('/', static function () {
43+ // ...
44+ });
45+ });
46+ });
47+
48+ Now the ``csrf `` filter is executed for both the route ``admin `` and ``admin/users ``.
49+ In previous versions, it is executed only for the route ``admin ``.
50+ See also :ref: `routing-nesting-groups `.
51+
2152Method Signature Changes
2253========================
2354
You can’t perform that action at this time.
0 commit comments