Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 696c423

Browse files
committed
minor symfony#15282 Recommend using root controller attribute in route definition (andrew-demb)
This PR was merged into the 4.4 branch. Discussion ---------- Recommend using root `controller` attribute in route definition Also, it is consistent with the example above: ``` # config/routes.yaml hello: path: /hello controller: App\Controller\HelloController::index methods: GET ``` Checked on Symfony 5.2.6 Commits ------- 1a7717a Recommend using root `controller` attribute in route definition
2 parents 26b82af + 1a7717a commit 696c423

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/service.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ which is a common practice when following the `ADR pattern`_
110110
# config/routes.yaml
111111
hello:
112112
path: /hello/{name}
113-
defaults: { _controller: app.hello_controller }
113+
controller: app.hello_controller
114114
115115
.. code-block:: xml
116116

0 commit comments

Comments
 (0)