8000 minor #13538 Fix documentation for a controllers with __invoke functi… · symfony/symfony-docs@1d30a61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d30a61

Browse files
committed
minor #13538 Fix documentation for a controllers with __invoke function in php routing (Ferror)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead. Discussion ---------- Fix documentation for a controllers with __invoke function in php routing Hi, the current docs tell that proper using controller with ```__invoke``` class should be implemented by: ``` // if the action is implemented as the __invoke() method of the // controller class, you can skip the ', method_name]' part: // ->controller([BlogController::class]) ``` which is wrong. The implementation should be without ```[]``` brackets: ``` // ->controller(BlogController::class) ``` Commits ------- bcb84de Fix documentation for a controllers with __invoke function in php routing
2 parents 6490b30 + bcb84de commit 1d30a61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ the ``BlogController``:
137137
138138
// if the action is implemented as the __invoke() method of the
139139
// controller class, you can skip the ', method_name]' part:
140-
// ->controller([BlogController::class])
140+
// ->controller(BlogController::class)
141141
;
142142
};
143143

0 commit comments

Comments
 (0)
0