From fe04b386efb147fb68a37b5ca026ad92255fa785 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 18 Sep 2023 15:05:40 +0200 Subject: [PATCH] [Routing] Improve the explanation of the exclude parameter --- routing.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/routing.rst b/routing.rst index 6b39604eed0..b9e5492c612 100644 --- a/routing.rst +++ b/routing.rst @@ -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 @@ -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) --> + exclude="../../src/Controller/{Debug*Controller.php}"> en|es|fr @@ -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')