File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ so Symfony doesn't try to get/set its value from the related entity::
60
60
61
61
class ProductType extends AbstractType
62
62
{
63
- public function buildForm(FormBuilderInterface $builder, array $options)
63
+ public function buildForm(FormBuilderInterface $builder, array $options): void
64
64
{
65
65
$builder
66
66
// ...
Original file line number Diff line number Diff line change @@ -948,6 +948,17 @@ you don't need to do *anything*: the service will be automatically loaded. Then,
948
948
implements ``Twig\Extension\ExtensionInterface ``. And thanks to ``autowire ``, you can even add
949
949
constructor arguments without any configuration.
950
950
951
+ Autconfiguration also works with attributes. Some attributes like
952
+ :class: `Symfony\\ Component\\ Messenger\\ Attribute\\ AsMessageHandler `,
953
+ :class: `Symfony\\ Component\\ EventDispatcher\\ Attribute\\ AsEventListener ` and
954
+ :class: `Symfony\\ Component\\ Console\\ Attribute\\ AsCommand ` are registered
955
+ for autoconfiguration. Any class using these attributes will have tags applied
956
+ to them.
957
+
958
+ .. versionadded :: 5.3
959
+
960
+ Autoconfiguration through attributes was introduced in Symfony 5.3.
961
+
951
962
Linting Service Definitions
952
963
---------------------------
953
964
You can’t perform that action at this time.
0 commit comments