Skip to content

[Routing] Add note on nuances of the Routing exclude config option #20241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ when importing the routes.

# config/routes/attributes.yaml
controllers:
resource: '../../src/Controller/'
resource: '../../src/Controller/**/*'
type: attribute
# this is added to the beginning of all imported route URLs
prefix: '/blog'
Expand All @@ -1455,6 +1455,9 @@ when importing the routes.

# you can optionally exclude some files/subdirectories when loading attributes
# (the value must be a string or an array of PHP glob patterns)
# NOTE: For now, this will only work if you are using the string, glob notation for the
# resource value. The array notation containing `path` & `namespace` will not work,
# and neither will using a non-glob string like `'../src/Controller'`.
# exclude: '../../src/Controller/{Debug*Controller.php}'

.. code-block:: xml
Expand Down
Loading