Skip to content

Commit

Permalink
Merge pull request #8178 from kenjis/docs-fix-routes-filter-output
Browse files Browse the repository at this point in the history
docs: make note for `spark routes` and filters more accurate
  • Loading branch information
kenjis authored Nov 10, 2023
2 parents 36e555c + 757973c commit 0ab4d67
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 4 additions & 3 deletions user_guide_src/source/incoming/filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ filter:check

.. versionadded:: 4.3.0

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

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

****************
Provided Filters
Expand Down
8 changes: 7 additions & 1 deletion user_guide_src/source/incoming/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,13 @@ The *Route* column shows the route path to match. The route of a defined route i

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

.. 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.
.. important:: The system is not perfect.
For routes containing regular expression patterns like ``([^/]+)`` or ``{locale}``,
the *Filters* displayed might not be correct (if you set complicated URI pattern
for the filters in **app/Config/Filters.php**), or it is displayed as ``<unknown>``.

The :ref:`spark filter:check <spark-filter-check>` command can be used to check
for 100% accurate filters.

Auto Routing (Improved)
-----------------------
Expand Down

0 comments on commit 0ab4d67

Please sign in to comment.