File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ Filter Execution Order
2727The order in which Controller Filters are executed has changed. See
2828:ref: `Upgrading Guide <upgrade-450-filter-execution-order >` for details.
2929
30+ Nested Route Groups and Options
31+ -------------------------------
32+
33+ Due to a bug fix, the behavior has changed so that options passed to the outer
34+ ``group() `` are merged with the options of the inner ``group() ``.
35+ See :ref: `Upgrading Guide <upgrade-450-nested-route-groups-and-options >` for details.
36+
3037Others
3138------
3239
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