File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Resources/doc/reference/configuration Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ checked in the order specified, where the first match wins.
27
27
# match all actions of a specific controller
28
28
-
29
29
match :
30
- attributes : { _controller: ^AcmeBundle:Default :.* }
30
+ attributes : { _controller: ^Acme\\TestBundle\\Controller\\DefaultController: :.* }
31
31
additional_cacheable_status : [400]
32
32
headers :
33
33
cache_control :
Original file line number Diff line number Diff line change @@ -81,8 +81,16 @@ _controller
81
81
82
82
Controller name regular expression. Note that this is the controller name used
83
83
in the route, so it depends on your route configuration whether you need
84
- ``Bundle:Name:action `` or ``service.id:methodName `` (if you defined your
85
- `controllers as services `_).
84
+ ``Acme\\TestBundle\\Controller\\NameController::hello `` or ``acme_test.controller.name:helloAction ``
85
+ for `controllers as services `_.
86
+
87
+ .. warning ::
88
+
89
+ Symfony always expands the short notation in route definitions. Even if you
90
+ define your route as ``AcmeTestBundle:Name:hello `` you still need to use
91
+ the long form here. If you use a service however, the compiled route still
92
+ uses the service name and you need to match on that. If you mixed both, you
93
+ can do a regular expression like ``^(Acme\\TestBundle|acme_test.controller) ``.
86
94
87
95
_route
88
96
^^^^^^
You can’t perform that action at this time.
0 commit comments