@@ -23,8 +23,8 @@ until you interact with the proxy in some way.
23
23
24
24
.. warning ::
25
25
26
- Lazy services do not support `final `_ or ``readonly `` classes, but you can use
27
- `Interface Proxifying `_ to work around this limitation.
26
+ Lazy services support for `final `_ or ``readonly `` classes was introduced in Symfony 7.3, and
27
+ requires PHP 8.4 or newer. You can use `Interface Proxifying `_ to work around this limitation.
28
28
29
29
.. _lazy-services_configuration :
30
30
@@ -145,9 +145,9 @@ It defines an optional parameter used to define interfaces for proxy and interse
145
145
Interface Proxifying
146
146
--------------------
147
147
148
- Under the hood, proxies generated to lazily load services inherit from the class
149
- used by the service. However, sometimes this is not possible at all (e.g. because
150
- the class is `final `_ and can not be extended) or not convenient .
148
+ Under the hood, lazy services leverage ` lazy objects `_ since PHP 8.4 and Symfony 7.3. In earlier version,
149
+ proxy objects inheriting from the service's class are generated. One of the limitations of proxy objects
150
+ is inability to extend `final `_ or `` readonly `` classes .
151
151
152
152
To workaround this limitation, you can configure a proxy to only implement
153
153
specific interfaces.
@@ -231,4 +231,5 @@ implement multiple interfaces by adding new "proxy" tags.
231
231
232
232
.. _`ghost object` : https://en.wikipedia.org/wiki/Lazy_loading#Ghost
233
233
.. _`final` : https://www.php.net/manual/en/language.oop5.final.php
234
+ .. _`lazy objects` : https://www.php.net/manual/en/language.oop5.lazy-objects.php
234
235
.. _`proxy` : https://en.wikipedia.org/wiki/Proxy_pattern
0 commit comments