Skip to content

Commit 154d86b

Browse files
committed
minor #17654 [DependencyInjection] 6.0 [autowiring] remove mention to @required (alexislefebvre)
This PR was merged into the 6.0 branch. Discussion ---------- [DependencyInjection] 6.0 [autowiring] remove mention to `@required` Symfony 6+ requires PHP 8, so `#[Required]` can be used in all cases, and mentioning ``@required`` doesn't add any value. Commits ------- e891e95 remove mention to `@required`
2 parents 0ce6f44 + e891e95 commit 154d86b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

service_container/autowiring.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,11 +578,8 @@ Autowiring will automatically call *any* method with the ``#[Required]`` attribu
578578
above it, autowiring each argument. If you need to manually wire some of the arguments
579579
to a method, you can always explicitly :doc:`configure the method call </service_container/calls>`.
580580

581-
If your PHP version doesn't support attributes (they were introduced in PHP 8),
582-
you can use the ``@required`` annotation instead.
583-
584581
Despite property injection having some :ref:`drawbacks <property-injection>`,
585-
autowiring with ``#[Required]`` or ``@required`` can also be applied to public
582+
autowiring with ``#[Required]`` can also be applied to public
586583
typed properties:
587584

588585
.. configuration-block::

0 commit comments

Comments
 (0)