8000 feature #3966 [Cookbook][Controller] Add note about invokable control… · symfony/symfony-docs@3f92d5f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f92d5f

Browse files
committed
feature #3966 [Cookbook][Controller] Add note about invokable controller services (kbond)
This PR was merged into the master branch. Discussion ---------- [Cookbook][Controller] Add note about invokable controller services | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes (symfony/symfony#11193) | Applies to | 2.6+ | Fixed tickets | - Commits ------- 9879ee6 Add note about invokable controller services
2 parents 9d7c999 + 9879ee6 commit 3f92d5f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cookbook/controller/service.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ the route ``_controller`` value:
136136
:doc:`FrameworkExtraBundle documentation </bundles/SensioFrameworkExtraBundle/annotations/routing>`
137137
for details.
138138

139+
.. versionadded:: 2.6
140+
If your controller service implements the ``__invoke`` method, you can simply refer to the service id
141+
(``acme.hello.controller``).
142+
139143
Alternatives to base Controller Methods
140144
---------------------------------------
141145

0 commit comments

Comments
 (0)
0