Skip to content

Commit 1fd4f07

Browse files
committed
complement lazy service autowiring
1 parent 8497373 commit 1fd4f07

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

service_container/lazy_services.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ You can also configure laziness when your service is injected with the
120120
}
121121
}
122122

123+
This attribute also allows you to define the interfaces to proxy when using
124+
laziness, and supports lazy-autowiring of intersection types::
125+
126+
public function __construct(
127+
#[Autowire(service: 'foo', lazy: FooInterface::class)]
128+
FooInterface|BarInterface $foo,
129+
) {
130+
}
131+
123132
.. versionadded:: 6.3
124133

125134
The ``lazy`` argument of the ``#[Autowire()]`` attribute was introduced in

0 commit comments

Comments
 (0)