diff --git a/service_container/autowiring.rst b/service_container/autowiring.rst index 20c6e1223b6..d70ccbdaa53 100644 --- a/service_container/autowiring.rst +++ b/service_container/autowiring.rst @@ -578,11 +578,8 @@ Autowiring will automatically call *any* method with the ``#[Required]`` attribu above it, autowiring each argument. If you need to manually wire some of the arguments to a method, you can always explicitly :doc:`configure the method call `. -If your PHP version doesn't support attributes (they were introduced in PHP 8), -you can use the ``@required`` annotation instead. - Despite property injection having some :ref:`drawbacks `, -autowiring with ``#[Required]`` or ``@required`` can also be applied to public +autowiring with ``#[Required]`` can also be applied to public typed properties: .. configuration-block:: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy