From 08c14844bd84010d7bfcdab939305323044966d4 Mon Sep 17 00:00:00 2001 From: Toby Griffiths Date: Thu, 19 Sep 2024 19:29:44 +0100 Subject: [PATCH] [Routing] Add note on nuances of the Routing exclude config option --- routing.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routing.rst b/routing.rst index 57a087b8cfa..682b96d9c42 100644 --- a/routing.rst +++ b/routing.rst @@ -1439,7 +1439,7 @@ when importing the routes. # config/routes/attributes.yaml controllers: - resource: '../../src/Controller/' + resource: '../../src/Controller/**/*' type: attribute # this is added to the beginning of all imported route URLs prefix: '/blog' @@ -1455,6 +1455,9 @@ when importing the routes. # you can optionally exclude some files/subdirectories when loading attributes # (the value must be a string or an array of PHP glob patterns) + # NOTE: For now, this will only work if you are using the string, glob notation for the + # resource value. The array notation containing `path` & `namespace` will not work, + # and neither will using a non-glob string like `'../src/Controller'`. # exclude: '../../src/Controller/{Debug*Controller.php}' .. code-block:: xml