Skip to content

Commit c8cb5cc

Browse files
committed
docs: add changelog and upgrade
1 parent 037b085 commit c8cb5cc

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

user_guide_src/source/changelogs/v4.5.0.rst

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ Filter Execution Order
2727
The 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+
3037
Others
3138
------
3239

user_guide_src/source/incoming/routing.rst

+2
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,8 @@ given route config options:
535535

536536
.. literalinclude:: routing/027.php
537537

538+
.. _routing-nesting-groups:
539+
538540
Nesting Groups
539541
==============
540542

user_guide_src/source/installation/upgrade_450.rst

+31
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,37 @@ Mandatory File Changes
1818
Breaking 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+
2152
Method Signature Changes
2253
========================
2354

0 commit comments

Comments
 (0)