File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,8 @@ in method parameters:
28
28
resource : ' ../src/Controller/'
29
29
tags : ['controller.service_arguments']
30
30
31
- .. versionadded :: 5.3
32
-
33
- The ``#[AsController] `` attribute was introduced in Symfony 5.3.
34
-
35
- If you are using PHP 8.0 or later, you can use the ``#[AsController] `` PHP
36
- attribute to automatically apply the ``controller.service_arguments `` tag to
37
- your controller services::
31
+ If you prefer, you can use the ``#[AsController] `` PHP attribute to automatically
32
+ apply the ``controller.service_arguments `` tag to your controller services::
38
33
39
34
// src/Controller/HelloController.php
40
35
namespace App\Controller;
@@ -52,6 +47,10 @@ your controller services::
52
47
}
53
48
}
54
49
50
+ .. versionadded :: 5.3
51
+
52
+ The ``#[AsController] `` attribute was introduced in Symfony 5.3.
53
+
55
54
Registering your controller as a service is the first step, but you also need to
56
55
update your routing config to reference the service properly, so that Symfony
57
56
knows to use it.
You can’t perform that action at this time.
0 commit comments