Skip to content

Commit 8df109f

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: [Routing] Improve the explanation of the exclude parameter
2 parents 0e57479 + 7642001 commit 8df109f

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
@@ -1443,7 +1443,8 @@ when importing the routes.
14431443
# trailing_slash_on_root: false
14441444
14451445
# you can optionally exclude some files/subdirectories when loading annotations
1446-
# exclude: '../../src/Controller/{DebugEmailController}.php'
1446+
# (the value must be a string or an array of PHP glob patterns)
1447+
# exclude: '../../src/Controller/{Debug*Controller.php}'
14471448
14481449
.. code-block:: xml
14491450
@@ -1458,12 +1459,13 @@ when importing the routes.
14581459
the 'prefix' value is added to the beginning of all imported route URLs
14591460
the 'name-prefix' value is added to the beginning of all imported route names
14601461
the 'exclude' option defines the files or subdirectories ignored when loading annotations
1462+
(the value must be a PHP glob pattern and you can repeat this option any number of times)
14611463
-->
14621464
<import resource="../../src/Controller/"
14631465
type="annotation"
14641466
prefix="/blog"
14651467
name-prefix="blog_"
1466-
exclude="../../src/Controller/{DebugEmailController}.php">
1468+
exclude="../../src/Controller/{Debug*Controller.php}">
14671469
<!-- these requirements are added to all imported routes -->
14681470
<requirement key="_locale">en|es|fr</requirement>
14691471
</import>
@@ -1489,7 +1491,8 @@ when importing the routes.
14891491
false,
14901492
// the optional fourth argument is used to exclude some files
14911493
// or subdirectories when loading annotations
1492-
'../../src/Controller/{DebugEmailController}.php'
1494+
// (the value must be a string or an array of PHP glob patterns)
1495+
'../../src/Controller/{Debug*Controller.php}'
14931496
)
14941497
// this is added to the beginning of all imported route URLs
14951498
->prefix('/blog')

0 commit comments

Comments
 (0)