Skip to content

Commit 6347f1d

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [Routing] Adding `exclude` to PHP code sample
2 parents f84c8b3 + ee18ef9 commit 6347f1d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

routing.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,9 +1524,11 @@ when importing the routes.
15241524
# these requirements are added to all imported routes
15251525
requirements:
15261526
_locale: 'en|es|fr'
1527+
15271528
# An imported route with an empty URL will become "/blog/"
15281529
# Uncomment this option to make that URL "/blog" instead
15291530
# trailing_slash_on_root: false
1531+
15301532
# you can optionally exclude some files/subdirectories when loading annotations
15311533
# exclude: '../../src/Controller/{DebugEmailController}.php'
15321534
@@ -1573,13 +1575,19 @@ when importing the routes.
15731575
$routes->import('../../src/Controller/', 'annotation')
15741576
// this is added to the beginning of all imported route URLs
15751577
->prefix('/blog')
1578+
15761579
// An imported route with an empty URL will become "/blog/"
15771580
// Pass FALSE as the second argument to make that URL "/blog" instead
15781581
// ->prefix('/blog', false)
1582+
15791583
// this is added to the beginning of all imported route names
15801584
->namePrefix('blog_')
1585+
15811586
// these requirements are added to all imported routes
15821587
->requirements(['_locale' => 'en|es|fr'])
1588+
1589+
// you can optionally exclude some files/subdirectories when loading annotations
1590+
->exclude('../../src/Controller/{DebugEmailController}.php')
15831591
;
15841592
};
15851593

0 commit comments

Comments
 (0)