Skip to content

Commit 9abf823

Browse files
peterrehmweaverryan
authored andcommitted
Added information about how to test if lazy loaded services are working
1 parent 00153ac commit 9abf823

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/dependency_injection/lazy_services.rst

+8
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ the same signature of the class representing the service. You can also inject
7979
the service just like normal into other services. The object that's actually
8080
injected will be the proxy.
8181

82+
To check if your proxy works you can simply check the interface of the
83+
received object.
84+
85+
var_dump(class_implements($service));
86+
87+
If the class implements the ProxyManager\Proxy\LazyLoadingInterface your lazy
88+
loaded services will work as expected.
89+
8290
.. note::
8391

8492
If you don't install the `ProxyManager bridge`_, the container will just

0 commit comments

Comments
 (0)