Skip to content

Commit 160d849

Browse files
committed
Tweak
1 parent 88d9bf7 commit 160d849

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

controller/service.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@ in method parameters:
2828
resource: '../src/Controller/'
2929
tags: ['controller.service_arguments']
3030
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::
3833

3934
// src/Controller/HelloController.php
4035
namespace App\Controller;
@@ -52,6 +47,10 @@ your controller services::
5247
}
5348
}
5449

50+
.. versionadded:: 5.3
51+
52+
The ``#[AsController]`` attribute was introduced in Symfony 5.3.
53+
5554
Registering your controller as a service is the first step, but you also need to
5655
update your routing config to reference the service properly, so that Symfony
5756
knows to use it.

0 commit comments

Comments
 (0)