Skip to content

Commit 0ab4d67

Browse files
authored
Merge pull request #8178 from kenjis/docs-fix-routes-filter-output
docs: make note for `spark routes` and filters more accurate
2 parents 36e555c + 757973c commit 0ab4d67

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

user_guide_src/source/incoming/filters.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ filter:check
204204

205205
.. versionadded:: 4.3.0
206206

207-
Check the filters for the route ``/`` with **GET** method:
207+
For example, check the filters for the route ``/`` with **GET** method:
208208

209209
.. code-block:: console
210210
@@ -220,8 +220,9 @@ The output is like the following:
220220
| GET | / | | toolbar |
221221
+--------+-------+----------------+---------------+
222222
223-
You can also see the routes and filters by the ``spark routes`` command.
224-
See :ref:`URI Routing <routing-spark-routes>`.
223+
You can also see the routes and filters by the ``spark routes`` command,
224+
but it might not show accurate filters when you use regular expressions for routes.
225+
See :ref:`URI Routing <routing-spark-routes>` for details.
225226

226227
****************
227228
Provided Filters

user_guide_src/source/incoming/routing.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,13 @@ The *Route* column shows the route path to match. The route of a defined route i
915915

916916
Since v4.3.0, the *Name* column shows the route name. ``»`` indicates the name is the same as the route path.
917917

918-
.. important:: The system is not perfect. If you use Custom Placeholders, *Filters* might not be correct. If you want to check filters for a route, you can use :ref:`spark filter:check <spark-filter-check>` command.
918+
.. important:: The system is not perfect.
919+
For routes containing regular expression patterns like ``([^/]+)`` or ``{locale}``,
920+
the *Filters* displayed might not be correct (if you set complicated URI pattern
921+
for the filters in **app/Config/Filters.php**), or it is displayed as ``<unknown>``.
922+
923+
The :ref:`spark filter:check <spark-filter-check>` command can be used to check
924+
for 100% accurate filters.
919925

920926
Auto Routing (Improved)
921927
-----------------------

0 commit comments

Comments
 (0)