File tree 3 files changed +43
-0
lines changed
3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ BREAKING
21
21
Behavior Changes
22
22
================
23
23
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
+
24
34
- **Logger: ** The :php:func: `log_message() ` function and the logger methods in
25
35
``CodeIgniter\Log\Logger `` now do not return ``bool `` values. The return types
26
36
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:
535
535
536
536
.. literalinclude :: routing/027.php
537
537
538
+ .. _routing-nesting-groups :
539
+
538
540
Nesting Groups
539
541
==============
540
542
Original file line number Diff line number Diff line change @@ -18,6 +18,37 @@ Mandatory File Changes
18
18
Breaking Changes
19
19
****************
20
20
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
+
21
52
Method Signature Changes
22
53
========================
23
54
You can’t perform that action at this time.
0 commit comments