8000 Tweaks · symfony/symfony-docs@fe40b48 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe40b48

Browse files
committed
Tweaks
1 parent 95b8a38 commit fe40b48

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

service_container/autowiring.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,15 +600,16 @@ Autowiring will automatically call *any* method with the ``#[Required]`` attribu
600600
above it, autowiring each argument. If you need to manually wire some of the arguments
601601
to a method, you can always explicitly :doc:`configure the method call </service_container/calls>`.
602602

603-
If you need to 8000 stay compatible with PHP 7 and thus cannot use attributes, you can use
604-
the ``@required`` annotation instead.
603+
If your PHP version doesn't support attributes (they were introduced in PHP 8),
604+
you can use the ``@required`` annotation instead.
605605

606606
.. versionadded:: 5.2
607607

608608
The ``#[Required]`` attribute was introduced in Symfony 5.2.
609609

610-
Despite property injection has some :ref:`drawbacks <property-injection>`, autowiring with ``#[Required]``
611-
or ``@required`` can also be applied to public typed properties::
610+
Despite property injection has some :ref:`drawbacks <property-injection>`,
611+
autowiring with ``#[Required]`` or ``@required`` can also be applied to public
612+
typed properties::
612613

613614
.. configuration-block::
614615

0 commit comments

Comments
 (0)
0