Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Routing] Improve the explanation of the exclude parameter#18877

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:5.4fromjaviereguiluz:fix_14507
Sep 19, 2023
Merged
Changes fromall 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
9 changes: 6 additions & 3 deletionsrouting.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1670,7 +1670,8 @@ when importing the routes.
# trailing_slash_on_root: false

# you can optionally exclude some files/subdirectories when loading annotations
# exclude: '../../src/Controller/{DebugEmailController}.php'
# (the value must be a string or an array of PHP glob patterns)
# exclude: '../../src/Controller/{Debug*Controller.php}'

.. code-block:: xml

Expand All@@ -1685,12 +1686,13 @@ when importing the routes.
the 'prefix' value is added to the beginning of all imported route URLs
the 'name-prefix' value is added to the beginning of all imported route names
the 'exclude' option defines the files or subdirectories ignored when loading annotations
(the value must be a PHP glob pattern and you can repeat this option any number of times)
-->
<import resource="../../src/Controller/"
type="annotation"
prefix="/blog"
name-prefix="blog_"
exclude="../../src/Controller/{DebugEmailController}.php">
exclude="../../src/Controller/{Debug*Controller.php}">
<!-- these requirements are added to all imported routes -->
<requirement key="_locale">en|es|fr</requirement>
</import>
Expand All@@ -1716,7 +1718,8 @@ when importing the routes.
false,
// the optional fourth argument is used to exclude some files
// or subdirectories when loading annotations
'../../src/Controller/{DebugEmailController}.php'
// (the value must be a string or an array of PHP glob patterns)
'../../src/Controller/{Debug*Controller.php}'
)
// this is added to the beginning of all imported route URLs
->prefix('/blog')
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp