Skip to content

Commit 7642001

Browse files
committed
minor #18877 [Routing] Improve the explanation of the exclude parameter (javiereguiluz)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Routing] Improve the explanation of the exclude parameter Fixes #14507. Commits ------- fe04b38 [Routing] Improve the explanation of the exclude parameter
2 parents 27dc68d + fe04b38 commit 7642001

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

routing.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,8 @@ when importing the routes.
16701670
# trailing_slash_on_root: false
16711671
16721672
# you can optionally exclude some files/subdirectories when loading annotations
1673-
# exclude: '../../src/Controller/{DebugEmailController}.php'
1673+
# (the value must be a string or an array of PHP glob patterns)
1674+
# exclude: '../../src/Controller/{Debug*Controller.php}'
16741675
16751676
.. code-block:: xml
16761677
@@ -1685,12 +1686,13 @@ when importing the routes.
16851686
the 'prefix' value is added to the beginning of all imported route URLs
16861687
the 'name-prefix' value is added to the beginning of all imported route names
16871688
the 'exclude' option defines the files or subdirectories ignored when loading annotations
1689+
(the value must be a PHP glob pattern and you can repeat this option any number of times)
16881690
-->
16891691
<import resource="../../src/Controller/"
16901692
type="annotation"
16911693
prefix="/blog"
16921694
name-prefix="blog_"
1693-
exclude="../../src/Controller/{DebugEmailController}.php">
1695+
exclude="../../src/Controller/{Debug*Controller.php}">
16941696
<!-- these requirements are added to all imported routes -->
16951697
<requirement key="_locale">en|es|fr</requirement>
16961698
</import>
@@ -1716,7 +1718,8 @@ when importing the routes.
17161718
false,
17171719
// the optional fourth argument is used to exclude some files
17181720
// or subdirectories when loading annotations
1719-
'../../src/Controller/{DebugEmailController}.php'
1721+
// (the value must be a string or an array of PHP glob patterns)
1722+
'../../src/Controller/{Debug*Controller.php}'
17201723
)
17211724
// this is added to the beginning of all imported route URLs
17221725
->prefix('/blog')

0 commit comments

Comments
 (0)